作者 李宇航

合并分支 'lyh-server' 到 'master'

gxAiblog自动发布



查看合并请求 !2001
@@ -128,7 +128,7 @@ class AiBlogAutoPublish extends Command @@ -128,7 +128,7 @@ class AiBlogAutoPublish extends Command
128 public function createTask($keywords, $project_id, $frequency){ 128 public function createTask($keywords, $project_id, $frequency){
129 $keyword = $keywords[array_rand($keywords)]; 129 $keyword = $keywords[array_rand($keywords)];
130 $aiBlogService = new AiBlogService($project_id); 130 $aiBlogService = new AiBlogService($project_id);
131 - $result = $aiBlogService->setRoute($keyword)->createTask($keyword); 131 + $result = $aiBlogService->createTask($keyword);
132 if ($result['status'] == 200) { 132 if ($result['status'] == 200) {
133 $aiBlogTaskModel = new AiBlogTaskModel(); 133 $aiBlogTaskModel = new AiBlogTaskModel();
134 $next_auto_date = date('Y-m-d', strtotime('+' . mt_rand($frequency[0],$frequency[1]) . 'days')); //每3-6天自动发布 134 $next_auto_date = date('Y-m-d', strtotime('+' . mt_rand($frequency[0],$frequency[1]) . 'days')); //每3-6天自动发布
@@ -99,7 +99,6 @@ class AiBlogService @@ -99,7 +99,6 @@ class AiBlogService
99 $param['title'] = $title; 99 $param['title'] = $title;
100 } 100 }
101 $param['anchor'] = $anchor; 101 $param['anchor'] = $anchor;
102 - $param['url'] = $this->route;  
103 $param['mch_id'] = $this->mch_id; 102 $param['mch_id'] = $this->mch_id;
104 $param['template_id'] = 1; 103 $param['template_id'] = 1;
105 $this->sign = $this->generateSign($param,$this->key); 104 $this->sign = $this->generateSign($param,$this->key);