作者 lyh

gx脚本导出产品

@@ -56,6 +56,7 @@ class AiBlogLogic extends BaseLogic @@ -56,6 +56,7 @@ class AiBlogLogic extends BaseLogic
56 $aiBlogService->mch_id = $aiSettingInfo['mch_id']; 56 $aiBlogService->mch_id = $aiSettingInfo['mch_id'];
57 $aiBlogService->key = $aiSettingInfo['key']; 57 $aiBlogService->key = $aiSettingInfo['key'];
58 $aiBlogService->route = generateRoute(Translate::tran($this->param['route'], 'en')); 58 $aiBlogService->route = generateRoute(Translate::tran($this->param['route'], 'en'));
  59 + $aiBlogService->createAuthor();
59 $result = $aiBlogService->createTask($this->param['keyword'],$this->param['type']); 60 $result = $aiBlogService->createTask($this->param['keyword'],$this->param['type']);
60 if($result['status'] == 200){ 61 if($result['status'] == 200){
61 $aiBlogTaskModel = new AiBlogTask(); 62 $aiBlogTaskModel = new AiBlogTask();
@@ -96,8 +96,9 @@ class AiBlogService @@ -96,8 +96,9 @@ class AiBlogService
96 $request_url = $this->url.'api/author/create'; 96 $request_url = $this->url.'api/author/create';
97 $param = [ 97 $param = [
98 'mch_id'=>$this->mch_id, 98 'mch_id'=>$this->mch_id,
99 - 'sign'=>$this->sign,  
100 ]; 99 ];
  100 + $this->sign = $this->generateSign($param,$this->key);
  101 + $param['sign'] = $this->sign;
101 $result = http_post($request_url,json_encode($param,true)); 102 $result = http_post($request_url,json_encode($param,true));
102 return $result; 103 return $result;
103 } 104 }