作者 赵彬吉

update

@@ -100,7 +100,10 @@ class postInquiry extends Command @@ -100,7 +100,10 @@ class postInquiry extends Command
100 }else{ 100 }else{
101 //v4 v5分离项目 往测试链接推 101 //v4 v5分离项目 往测试链接推
102 $website = $detail['re_website']; 102 $website = $detail['re_website'];
103 - $site_array = file_get_contents('https://www.quanqiusou.cn/extend_api/saas/split.php'); 103 + $client = new \GuzzleHttp\Client();
  104 + $site_array = $client->request('GET', "https://www.quanqiusou.cn/extend_api/saas/split.php", [
  105 + 'proxy' => env('CURL_PROXY'), // 代理服务器地址和端口号
  106 + ])->getBody()->getContents();
104 $site_array = json_decode($site_array, true); 107 $site_array = json_decode($site_array, true);
105 $mail_urls = array_column($site_array, 'main_url'); 108 $mail_urls = array_column($site_array, 'main_url');
106 $key = array_search($detail['re_website'], $mail_urls); 109 $key = array_search($detail['re_website'], $mail_urls);
@@ -171,7 +174,7 @@ class postInquiry extends Command @@ -171,7 +174,7 @@ class postInquiry extends Command
171 ]; 174 ];
172 175
173 $res = Http::withoutVerifying()->post('https://form.globalso.com/api/external-interface/add/fa043f9cbec6b38f', $data)->json(); 176 $res = Http::withoutVerifying()->post('https://form.globalso.com/api/external-interface/add/fa043f9cbec6b38f', $data)->json();
174 - if(empty($res['code']) || $res['code'] != 200){ 177 + if(empty($res['data']['code']) || $res['data']['code'] != 200){
175 $log->status = ReInquiryDetailLog::STATUS_FAIL; 178 $log->status = ReInquiryDetailLog::STATUS_FAIL;
176 $log->remark = $res['message'] ?? ''; 179 $log->remark = $res['message'] ?? '';
177 $log->save(); 180 $log->save();