作者 lyh

gx

... ... @@ -90,11 +90,18 @@ class AiBlogService
* @author :lyh
* @method :post
* @time :2025/2/13 14:39
* @param :type=(1作者2文章) keyword=关键词 subtype=blog url=回调url , title=标题
* @param :type=(1作者2文章) keyword=关键词 subtype=blog url=回调url , $title = ''
*/
public function createTask($keyword,$type = 2,$subtype = 'Blog',$anchor = [],$title = ''){
$request_url = $this->url.'api/task/create';
$param = ['keyword'=>$keyword, 'type'=>$type, 'subtype'=>$subtype,'anchor'=>$anchor,'title'=>$title,'url'=>$this->route,'mch_id'=>$this->mch_id,'template_id'=>1];
$param = ['keyword'=>$keyword, 'type'=>$type, 'subtype'=>$subtype];
if(!empty($title)){
$param['title'] = $title;
}
$param['anchor'] = $anchor;
$param['url'] = $this->route;
$param['mch_id'] = $this->mch_id;
$param['template_id'] = 1;
$this->sign = $this->generateSign($param,$this->key);
$param['sign'] = $this->sign;
$result = http_post($request_url,json_encode($param,true));
... ...