作者 李宇航

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

Lyh server



查看合并请求 !1593
... ... @@ -31,12 +31,11 @@ class lyhDemo extends Command
protected $description = '更新路由';
public function handle(){
$aiBlogTaskModel = new AiBlogTask();
$lists = $aiBlogTaskModel->distinct()->pluck('project_id')->toArray();
foreach ($lists as $v){
echo '执行的项目id:'.$v;
Artisan::call('save_ai_blog_list', ['project_id' => $v]);
}
return true;
$client = new \GuzzleHttp\Client();
$data = $client->request('GET', 'https://quanqiusou.cn/extend_api/v6/update.php?postid='.'13810', [
'proxy' => env('CURL_PROXY'), // 代理服务器地址和端口号
])->getBody()->getContents();
$data = json_decode($data, true);
dd($data);
}
}
... ...
... ... @@ -12,6 +12,7 @@ namespace App\Http\Controllers\Bside\GoogleKeywordInsight;
use App\Enums\Common\Code;
use App\Http\Controllers\Bside\BaseController;
use App\Http\Logic\Bside\GoogleKeywordInsight\GoogleKeywordInsightLogic;
use App\Models\GoogleKeywordInsight\GoogleKeywordInsightDetail;
/**
* @remark :谷歌洞察数据
... ... @@ -35,7 +36,9 @@ class GoogleKeywordInsightController extends BaseController
],[
'keyword.required' => '关键词不能为空',
]);
$data = $logic->getGoogleInsight();
$logic->getGoogleInsight();
$detailModel = new GoogleKeywordInsightDetail();
$data = $detailModel->lists(['search'=>$this->param['keyword']],$this->page,$this->row);
$this->response('success',Code::SUCCESS,$data);
}
}
... ...
... ... @@ -35,7 +35,7 @@ class GoogleKeywordInsightLogic extends BaseLogic
* @time :2025/3/25 14:36
*/
public function getGoogleInsight(){
$data = $this->model->read(['search'=>$this->param['keyword']]);
$data = $this->model->read(['search'=>$this->param['keyword']],['id']);
if($data === false){
$this->service = new GoogleSearchService();
$data = $this->service->requestUrl($this->param['keyword']);
... ... @@ -52,10 +52,7 @@ class GoogleKeywordInsightLogic extends BaseLogic
$this->fail('保存失败,请联系管理员');
}
}
}else{
$googleDetailModel = new GoogleKeywordInsightDetail();
$data = $googleDetailModel->list(['search'=>$this->param['keyword']]);
}
return $this->success($data);
return $this->success();
}
}
... ...