合并分支 'lyh-server' 到 'master'
Lyh server 查看合并请求 !1593
正在显示
3 个修改的文件
包含
12 行增加
和
13 行删除
| @@ -31,12 +31,11 @@ class lyhDemo extends Command | @@ -31,12 +31,11 @@ class lyhDemo extends Command | ||
| 31 | protected $description = '更新路由'; | 31 | protected $description = '更新路由'; |
| 32 | 32 | ||
| 33 | public function handle(){ | 33 | public function handle(){ |
| 34 | - $aiBlogTaskModel = new AiBlogTask(); | ||
| 35 | - $lists = $aiBlogTaskModel->distinct()->pluck('project_id')->toArray(); | ||
| 36 | - foreach ($lists as $v){ | ||
| 37 | - echo '执行的项目id:'.$v; | ||
| 38 | - Artisan::call('save_ai_blog_list', ['project_id' => $v]); | ||
| 39 | - } | ||
| 40 | - return true; | 34 | + $client = new \GuzzleHttp\Client(); |
| 35 | + $data = $client->request('GET', 'https://quanqiusou.cn/extend_api/v6/update.php?postid='.'13810', [ | ||
| 36 | + 'proxy' => env('CURL_PROXY'), // 代理服务器地址和端口号 | ||
| 37 | + ])->getBody()->getContents(); | ||
| 38 | + $data = json_decode($data, true); | ||
| 39 | + dd($data); | ||
| 41 | } | 40 | } |
| 42 | } | 41 | } |
| @@ -12,6 +12,7 @@ namespace App\Http\Controllers\Bside\GoogleKeywordInsight; | @@ -12,6 +12,7 @@ namespace App\Http\Controllers\Bside\GoogleKeywordInsight; | ||
| 12 | use App\Enums\Common\Code; | 12 | use App\Enums\Common\Code; |
| 13 | use App\Http\Controllers\Bside\BaseController; | 13 | use App\Http\Controllers\Bside\BaseController; |
| 14 | use App\Http\Logic\Bside\GoogleKeywordInsight\GoogleKeywordInsightLogic; | 14 | use App\Http\Logic\Bside\GoogleKeywordInsight\GoogleKeywordInsightLogic; |
| 15 | +use App\Models\GoogleKeywordInsight\GoogleKeywordInsightDetail; | ||
| 15 | 16 | ||
| 16 | /** | 17 | /** |
| 17 | * @remark :谷歌洞察数据 | 18 | * @remark :谷歌洞察数据 |
| @@ -35,7 +36,9 @@ class GoogleKeywordInsightController extends BaseController | @@ -35,7 +36,9 @@ class GoogleKeywordInsightController extends BaseController | ||
| 35 | ],[ | 36 | ],[ |
| 36 | 'keyword.required' => '关键词不能为空', | 37 | 'keyword.required' => '关键词不能为空', |
| 37 | ]); | 38 | ]); |
| 38 | - $data = $logic->getGoogleInsight(); | 39 | + $logic->getGoogleInsight(); |
| 40 | + $detailModel = new GoogleKeywordInsightDetail(); | ||
| 41 | + $data = $detailModel->lists(['search'=>$this->param['keyword']],$this->page,$this->row); | ||
| 39 | $this->response('success',Code::SUCCESS,$data); | 42 | $this->response('success',Code::SUCCESS,$data); |
| 40 | } | 43 | } |
| 41 | } | 44 | } |
| @@ -35,7 +35,7 @@ class GoogleKeywordInsightLogic extends BaseLogic | @@ -35,7 +35,7 @@ class GoogleKeywordInsightLogic extends BaseLogic | ||
| 35 | * @time :2025/3/25 14:36 | 35 | * @time :2025/3/25 14:36 |
| 36 | */ | 36 | */ |
| 37 | public function getGoogleInsight(){ | 37 | public function getGoogleInsight(){ |
| 38 | - $data = $this->model->read(['search'=>$this->param['keyword']]); | 38 | + $data = $this->model->read(['search'=>$this->param['keyword']],['id']); |
| 39 | if($data === false){ | 39 | if($data === false){ |
| 40 | $this->service = new GoogleSearchService(); | 40 | $this->service = new GoogleSearchService(); |
| 41 | $data = $this->service->requestUrl($this->param['keyword']); | 41 | $data = $this->service->requestUrl($this->param['keyword']); |
| @@ -52,10 +52,7 @@ class GoogleKeywordInsightLogic extends BaseLogic | @@ -52,10 +52,7 @@ class GoogleKeywordInsightLogic extends BaseLogic | ||
| 52 | $this->fail('保存失败,请联系管理员'); | 52 | $this->fail('保存失败,请联系管理员'); |
| 53 | } | 53 | } |
| 54 | } | 54 | } |
| 55 | - }else{ | ||
| 56 | - $googleDetailModel = new GoogleKeywordInsightDetail(); | ||
| 57 | - $data = $googleDetailModel->list(['search'=>$this->param['keyword']]); | ||
| 58 | } | 55 | } |
| 59 | - return $this->success($data); | 56 | + return $this->success(); |
| 60 | } | 57 | } |
| 61 | } | 58 | } |
-
请 注册 或 登录 后发表评论