作者 lyh

gx

@@ -22,7 +22,7 @@ class GoogleSearchController extends BaseController @@ -22,7 +22,7 @@ class GoogleSearchController extends BaseController
22 * @method :post 22 * @method :post
23 * @time :2025/3/27 13:59 23 * @time :2025/3/27 13:59
24 */ 24 */
25 - public function searchList(){ 25 + public function getSearchList(){
26 $this->request->validate([ 26 $this->request->validate([
27 'search' => 'required' 27 'search' => 'required'
28 ],[ 28 ],[
@@ -31,8 +31,7 @@ class GoogleSearchController extends BaseController @@ -31,8 +31,7 @@ class GoogleSearchController extends BaseController
31 //获取当前项目域名 31 //获取当前项目域名
32 $domain = parse_url($this->user['domain'], PHP_URL_HOST); 32 $domain = parse_url($this->user['domain'], PHP_URL_HOST);
33 $googleService = new GoogleSearchService(); 33 $googleService = new GoogleSearchService();
34 - $googleService->googleSearch();  
35 - $data = []; 34 + $data = $googleService->googleSearch($domain,$this->param['search']);
36 $this->response('success',Code::SUCCESS,$data); 35 $this->response('success',Code::SUCCESS,$data);
37 } 36 }
38 } 37 }
@@ -700,7 +700,10 @@ Route::middleware(['bloginauth'])->group(function () { @@ -700,7 +700,10 @@ Route::middleware(['bloginauth'])->group(function () {
700 Route::prefix('google_keyword_insight')->group(function () { 700 Route::prefix('google_keyword_insight')->group(function () {
701 Route::any('/getKeywordInsight', [\App\Http\Controllers\Bside\GoogleKeywordInsight\GoogleKeywordInsightController::class, 'getKeywordInsight'])->name('google_keyword_insight_getKeywordInsight'); 701 Route::any('/getKeywordInsight', [\App\Http\Controllers\Bside\GoogleKeywordInsight\GoogleKeywordInsightController::class, 'getKeywordInsight'])->name('google_keyword_insight_getKeywordInsight');
702 }); 702 });
703 - 703 + //google搜索数据
  704 + Route::prefix('google_search')->group(function () {
  705 + Route::any('/getSearchList', [\App\Http\Controllers\Bside\GoogleKeywordInsight\GoogleSearchController::class, 'getSearchList'])->name('google_search_getSearchList');
  706 + });
704 //企业产品库 707 //企业产品库
705 Route::prefix('enterprise_product')->group(function () { 708 Route::prefix('enterprise_product')->group(function () {
706 Route::any('/getEnterProduct', [\App\Http\Controllers\Bside\SeoSetting\EnterpriseProductController::class, 'getEnterProduct'])->name('enterprise_product_getEnterProduct'); 709 Route::any('/getEnterProduct', [\App\Http\Controllers\Bside\SeoSetting\EnterpriseProductController::class, 'getEnterProduct'])->name('enterprise_product_getEnterProduct');