作者 李宇航

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

gx企业洞察对接



查看合并请求 !1560
@@ -27,6 +27,7 @@ use App\Models\Project\Project; @@ -27,6 +27,7 @@ use App\Models\Project\Project;
27 use App\Models\Project\ProjectAiSetting; 27 use App\Models\Project\ProjectAiSetting;
28 use App\Models\RouteMap\RouteMap; 28 use App\Models\RouteMap\RouteMap;
29 use App\Services\AiBlogService; 29 use App\Services\AiBlogService;
  30 +use App\Services\GoogleKeywordInsightService;
30 use App\Services\ProjectServer; 31 use App\Services\ProjectServer;
31 use Illuminate\Support\Facades\DB; 32 use Illuminate\Support\Facades\DB;
32 33
@@ -41,7 +42,8 @@ class TestController extends BaseController @@ -41,7 +42,8 @@ class TestController extends BaseController
41 */ 42 */
42 public function ceshi(){ 43 public function ceshi(){
43 //获取上一周询盘数量 44 //获取上一周询盘数量
44 - $result = (new FormGlobalsoApi())->getDateInquiry($this->param['domain'],$this->param['start'],$this->param['end']);  
45 - $this->response('success',Code::SUCCESS,$result); 45 + $service = new GoogleKeywordInsightService();
  46 + $list = $service->requestUrl('cnc');
  47 + $this->response('success',Code::SUCCESS,$list);
46 } 48 }
47 } 49 }
@@ -18,7 +18,7 @@ namespace App\Services; @@ -18,7 +18,7 @@ namespace App\Services;
18 */ 18 */
19 class GoogleKeywordInsightService 19 class GoogleKeywordInsightService
20 { 20 {
21 - public $url = "https://google-keyword-insight1.p.rapidapi.com/globalkey"; 21 + public $url = "";
22 22
23 /** 23 /**
24 * @remark :请求数据 24 * @remark :请求数据
@@ -28,6 +28,7 @@ class GoogleKeywordInsightService @@ -28,6 +28,7 @@ class GoogleKeywordInsightService
28 * @time :2025/3/25 11:36 28 * @time :2025/3/25 11:36
29 */ 29 */
30 public function requestUrl($keyword){ 30 public function requestUrl($keyword){
  31 + $this->url = 'https://google-keyword-insight1.p.rapidapi.com/globalkey';
31 $url = $this->url.'/?keyword='.$keyword.'&lang=en'; 32 $url = $this->url.'/?keyword='.$keyword.'&lang=en';
32 $curl = curl_init(); 33 $curl = curl_init();
33 curl_setopt_array($curl, [ 34 curl_setopt_array($curl, [