作者 lyh

变更数据

@@ -66,6 +66,7 @@ class AiVideoLogic extends BaseLogic @@ -66,6 +66,7 @@ class AiVideoLogic extends BaseLogic
66 $aiVideoTaskModel = new AiVideoTask(); 66 $aiVideoTaskModel = new AiVideoTask();
67 $aiVideoService = new AiVideoService($this->user['project_id']); 67 $aiVideoService = new AiVideoService($this->user['project_id']);
68 $storage = $aiVideoTaskModel->videoSetting()[$this->user['video_setting'] ?? 1]; 68 $storage = $aiVideoTaskModel->videoSetting()[$this->user['video_setting'] ?? 1];
  69 + //todo::获取ayr的key
69 $result = $aiVideoService->createTask($this->param['title'],$this->param['description'],$this->param['images'],$this->param['anchor'] ?? [],$storage); 70 $result = $aiVideoService->createTask($this->param['title'],$this->param['description'],$this->param['images'],$this->param['anchor'] ?? [],$storage);
70 if($result['status'] == 200){ 71 if($result['status'] == 200){
71 $aiVideoTaskModel->addReturnId(['task_id'=>$result['data']['task_id'],'project_id'=>$this->user['project_id'],'storage'=>$storage]); 72 $aiVideoTaskModel->addReturnId(['task_id'=>$result['data']['task_id'],'project_id'=>$this->user['project_id'],'storage'=>$storage]);
@@ -55,9 +55,12 @@ class AiVideoService @@ -55,9 +55,12 @@ class AiVideoService
55 * @method :post 55 * @method :post
56 * @time :2025/4/29 17:59 56 * @time :2025/4/29 17:59
57 */ 57 */
58 - public function createTask($title,$description,$images = [],$anchor = [],$storage = 'CDN'){ 58 + public function createTask($title,$description,$images = [],$anchor = [],$storage = 'CDN',$ayrshare_profile_key = ''){
59 $request_url = $this->url.'api/video/create'; 59 $request_url = $this->url.'api/video/create';
60 $param = ['title'=>$title, 'description'=>$description, 'images'=>$images,'anchor'=>$anchor,'storage'=>$storage]; 60 $param = ['title'=>$title, 'description'=>$description, 'images'=>$images,'anchor'=>$anchor,'storage'=>$storage];
  61 + if(!empty($ayrshare_profile_key)){
  62 + $param['ayrshare_profile_key'] = $ayrshare_profile_key;
  63 + }
61 $param['mch_id'] = $this->mch_id; 64 $param['mch_id'] = $this->mch_id;
62 $this->sign = $this->generateSign($param,$this->key); 65 $this->sign = $this->generateSign($param,$this->key);
63 $param['sign'] = $this->sign; 66 $param['sign'] = $this->sign;