作者 李宇航

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

gx企业洞察对接



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