作者 lyh

变更数据

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