Files
huangjingfen/pro_v3.5.1_副本/vendor/qcloud/cos-sdk-v5/tests/CosClientCiTest.php

336 lines
10 KiB
PHP
Raw Normal View History

feat(fsgx): 完成全部24项开发任务 Phase1-7 Phase1 后端核心: - 新增 fsgx_v1.sql 迁移脚本(is_queue_goods/frozen_points/available_points/no_assess) - SystemConfigServices 返佣设置扩展(周期人数/分档比例/范围/时机) - StoreOrderCreateServices 周期循环佣金计算 - StoreOrderTakeServices 佣金发放后同步冻结积分 - StoreProductServices/StoreProduct 保存 is_queue_goods Phase2 后端接口: - GET /api/hjf/brokerage/progress 佣金周期进度 - GET /api/hjf/assets/overview 资产总览 - HjfPointsServices 每日 frozen_points 0.4‰ 释放定时任务 - PUT /adminapi/hjf/member/{uid}/no_assess 不考核接口 - GET /adminapi/hjf/points/release_log 积分日志接口 Phase3 前端清理: - hjfCustom.js 路由精简(仅保留 points/log) - hjfQueue.js/hjfMember.js API 清理/重定向至 CRMEB 原生接口 - pages.json 公排→推荐佣金/佣金记录/佣金规则 Phase4-5 前端改造: - queue/status.vue 推荐佣金进度页整体重写 - 商品详情/订单确认/支付结果页文案与逻辑改造 - 个人中心/资产页/引导页/规则页文案改造 - HjfQueueProgress/HjfRefundNotice/HjfAssetCard 组件改造 - 推广中心嵌入佣金进度摘要 - hjfMockData.js 全量更新(公排字段→佣金字段) Phase6 Admin 增强: - 用户列表新增 frozen_points/available_points 列及不考核操作按钮 - hjfPoints.js USE_MOCK=false 对接真实积分日志接口 Phase7 配置文档: - docs/fsgx-phase7-config-checklist.md 后台配置与全链路验收清单 Made-with: Cursor
2026-03-23 22:32:19 +08:00
<?php
namespace Qcloud\Cos\Tests;
use Qcloud\Cos\Exception\ServiceResponseException;
use Qcloud\Cos\Client;
//class CosClientCiTest extends TestCosClientBase
//{
// //TODO
/*
* 文本审核
*/
//public function testDetectText()
//{
// try {
// // 文本审核
// $content = '敏感词';
// $this->cosClient->detectText(array(
// 'Bucket' => $this->bucket,
// 'Input' => array(
// 'Content' => base64_encode($content) // 文本需base64_encode
// ),
// 'Conf' => array(
// 'DetectType' => 'Porn,Terrorism,Politics,Ads', //Porn,Terrorism,Politics,Ads,Illegal,Abuse类型
// ),
// ));
//
// // 桶文件审核
// $result = $this->cosClient->detectText(array(
// 'Bucket' => $this->bucket,
// 'Input' => array(
// 'Object' => 'test01.txt'
// ),
// 'Conf' => array(
// 'DetectType' => 'Porn,Terrorism,Politics,Ads', //Porn,Terrorism,Politics,Ads,Illegal,Abuse类型
// ),
// ));
// Common::waitSync();
// $jobId = $result['JobsDetail']['JobId'];
// $this->cosClient->getDetectTextResult(array(
// 'Bucket' => $this->bucket,
// 'Key' => $jobId,
// ));
//
// // 文本文件url审核
// $result = $this->cosClient->detectText(array(
// 'Bucket' => $this->bucket,
// 'Input' => array(
// 'Url' => 'https://bucket-123456.cos.ap-region.myqcloud.com/test01.txt'
// ),
// 'Conf' => array(
// 'DetectType' => 'Porn,Terrorism,Politics,Ads', //Porn,Terrorism,Politics,Ads,Illegal,Abuse类型
// ),
// ));
// Common::waitSync();
// $jobId = $result['JobsDetail']['JobId'];
// $this->cosClient->getDetectTextResult(array(
// 'Bucket' => $this->bucket,
// 'Key' => $jobId,
// ));
// $this->assertTrue(True);
// } catch (ServiceResponseException $e) {
// $this->assertFalse(True);
// }
//}
//
///*
// * 图片审核
// */
//public function testDetectImage()
//{
// try {
// // 存储桶图片审核
// $this->cosClient->detectImage(array(
// 'Bucket' => $this->bucket,
// 'Key' => 'test01.png',
// 'DetectType' => 'porn,politics,terrorist,ads', //可选四种参数porn,politics,terrorist,ads可使用多种规则注意规则间不要加空格
// 'ci-process' => 'sensitive-content-recognition',
// ));
//
// // 图片url审核
// $result = $this->cosClient->detectImage(array(
// 'Bucket' => $this->bucket,
// 'Key' => '/', // 链接图片资源路径写 / 即可
// 'DetectType' => 'porn,politics,terrorist,ads',
// 'DetectUrl' => 'https://wx4.sinaimg.cn/large/0024cZx9ly8guadz67tijj60rs0fg0xv02.jpg',
// 'ci-process' => 'sensitive-content-recognition',
// ));
//
// Common::waitSync();
//
// // 查看图片审核结果
// $jobId = $result['JobId'];
// $this->cosClient->getDetectImageResult(array(
// 'Bucket' => $this->bucket,
// 'Key' => $jobId,
// ));
//
// // 批量审核图片
// $this->cosClient->detectImages(array(
// 'Bucket' => $this->bucket,
// 'Inputs' => array(
// array(
// 'Object' => 'test01.png',
// ),
// array(
// 'Url' => 'https://wx4.sinaimg.cn/large/0024cZx9ly8guadz67tijj60rs0fg0xv02.jpg',
// ),
// ),
// 'Conf' => array(
// 'DetectType' => 'Porn,Terrorism,Politics,Ads',
// )
// ));
// $this->assertTrue(True);
// } catch (ServiceResponseException $e) {
// $this->assertFalse(True);
// }
//}
//
///*
// * 音频审核
// */
//public function testDetectAudio()
//{
// try {
// // 桶文件审核
// $result = $this->cosClient->detectAudio(array(
// 'Bucket' => $this->bucket,
// 'Input' => array(
// 'Object' => 'sound01.mp3',
// ),
// 'Conf' => array(
// 'DetectType' => 'Porn,Terrorism,Politics,Ads',
// ),
// ));
//
// Common::waitSync();
//
// // 查看音频审核结果
// $jobId = $result['JobsDetail']['JobId'];
// $this->cosClient->getDetectAudioResult(array(
// 'Bucket' => $this->bucket,
// 'Key' => $jobId,
// ));
//
// // 音频url审核
// $result = $this->cosClient->detectAudio(array(
// 'Bucket' => $this->bucket,
// 'Input' => array(
// 'Url' => 'http://mpge.5nd.com/2019/2019-5-17/91703/2.mp3',
// ),
// 'Conf' => array(
// 'DetectType' => 'Porn,Terrorism,Politics,Ads',
// ),
// ));
//
// Common::waitSync();
//
// // 查看音频审核结果
// $jobId = $result['JobsDetail']['JobId'];
// $this->cosClient->getDetectAudioResult(array(
// 'Bucket' => $this->bucket,
// 'Key' => $jobId,
// ));
// $this->assertTrue(True);
// } catch (ServiceResponseException $e) {
// $this->assertFalse(True);
// }
//}
//
///*
// * 视频审核
// */
//public function testDetectVideo()
//{
// try {
// // 桶文件审核
// $result = $this->cosClient->detectVideo(array(
// 'Bucket' => $this->bucket,
// 'Input' => array(
// 'Object' => 'video01.mp4', // 存储桶文件
// ),
// 'Conf' => array(
// 'DetectType' => 'Porn,Terrorism,Politics,Ads',
// 'Snapshot' => array(
// 'Count' => '3',
// ),
// ),
// ));
//
// Common::waitSync();
//
// // 查看视频审核结果
// $jobId = $result['JobsDetail']['JobId'];
// $this->cosClient->getDetectVideoResult(array(
// 'Bucket' => $this->bucket,
// 'Key' => $jobId,
// ));
//
// // 视频url审核
// $result = $this->cosClient->detectVideo(array(
// 'Bucket' => $this->bucket,
// 'Input' => array(
// 'Url' => 'https://vd2.bdstatic.com/mda-mi699c6pfpap5i0h/fhd/cae_h264_nowatermark/1630996539537195871/mda-mi699c6pfpap5i0h.mp4',
// ),
// 'Conf' => array(
// 'DetectType' => 'Porn,Terrorism,Politics,Ads',
// 'Snapshot' => array(
// 'Count' => '3',
// ),
// ),
// ));
//
// Common::waitSync();
//
// // 查看视频审核结果
// $jobId = $result['JobsDetail']['JobId'];
// $this->cosClient->getDetectVideoResult(array(
// 'Bucket' => $this->bucket,
// 'Key' => $jobId,
// ));
//
// $this->assertTrue(True);
// } catch (ServiceResponseException $e) {
// $this->assertFalse(True);
// }
//}
//
///*
// * 文档审核
// */
//public function testDetectDocument()
//{
// try {
// // 桶文件审核
// $result = $this->cosClient->detectDocument(array(
// 'Bucket' => $this->bucket,
// 'Input' => array(
// 'Object' => 'test01.docx',
// 'Type' => 'docx',
// ),
// 'Conf' => array(
// 'DetectType' => 'Porn,Terrorism,Politics,Ads',
// ),
// ));
//
// Common::waitSync();
//
// // 查看文档审核结果
// $jobId = $result['JobsDetail']['JobId'];
// $this->cosClient->getDetectDocumentResult(array(
// 'Bucket' => $this->bucket,
// 'Key' => $jobId,
// ));
//
// // 文档url审核
// $result = $this->cosClient->detectDocument(array(
// 'Bucket' => $this->bucket,
// 'Input' => array(
// 'Url' => 'http://e.sinajs.cn/tui/docs/guiding.pdf',
// 'Type' => 'pdf',
// ),
// 'Conf' => array(
// 'DetectType' => 'Porn,Terrorism,Politics,Ads',
// ),
// ));
//
// Common::waitSync();
//
// // 查看文档审核结果
// $jobId = $result['JobsDetail']['JobId'];
// $this->cosClient->getDetectDocumentResult(array(
// 'Bucket' => $this->bucket,
// 'Key' => $jobId,
// ));
//
// $this->assertTrue(True);
// } catch (ServiceResponseException $e) {
// $this->assertFalse(True);
// }
//}
//
///*
// * 云查毒
// */
//public function testDetectVirus()
//{
// try {
// // 桶文件审核
// $result = $this->cosClient->detectVirus(array(
// 'Bucket' => $this->bucket,
// 'Input' => array(
// 'Object' => 'test01.docx'
// ),
// 'Conf' => array(
// 'DetectType' => 'Virus',
// ),
// ));
//
// Common::waitSync();
//
// // 查看云查毒结果
// $jobId = $result['JobsDetail']['JobId'];
// $this->cosClient->getDetectVirusResult(array(
// 'Bucket' => $this->bucket,
// 'Key' => $jobId,
// ));
//
// // url查毒
// $result = $this->cosClient->detectVirus(array(
// 'Bucket' => $this->bucket,
// 'Input' => array(
// 'Url' => 'http://e.sinajs.cn/tui/docs/guiding.pdf',
// ),
// 'Conf' => array(
// 'DetectType' => 'Virus',
// ),
// ));
//
// Common::waitSync();
//
// // 查看云查毒结果
// $jobId = $result['JobsDetail']['JobId'];
// $this->cosClient->getDetectVirusResult(array(
// 'Bucket' => $this->bucket,
// 'Key' => $jobId,
// ));
//
// $this->assertTrue(True);
// } catch (ServiceResponseException $e) {
// $this->assertFalse(True);
// }
//}
//}