|
...
|
...
|
@@ -116,17 +116,17 @@ class postInquiry extends Command |
|
|
|
}
|
|
|
|
}else{
|
|
|
|
//v4 v5分离项目 往测试链接推
|
|
|
|
$split_api_cache_key = 'extend_api_saas_split';
|
|
|
|
$mail_urls = Cache::get($split_api_cache_key);
|
|
|
|
if(!$mail_urls){
|
|
|
|
$split_api_cache_key = 'quanqiusou_split_site_array';
|
|
|
|
$site_array = Cache::get($split_api_cache_key);
|
|
|
|
if(!$site_array){
|
|
|
|
$client = new \GuzzleHttp\Client();
|
|
|
|
$site_array = $client->request('GET', "https://www.quanqiusou.cn/extend_api/saas/split.php", [
|
|
|
|
'proxy' => env('CURL_PROXY'), // 代理服务器地址和端口号
|
|
|
|
])->getBody()->getContents();
|
|
|
|
$site_array = json_decode($site_array, true);
|
|
|
|
$mail_urls = array_column($site_array, 'main_url');
|
|
|
|
Cache::put($split_api_cache_key, $mail_urls, 7200);
|
|
|
|
Cache::put($split_api_cache_key, $site_array, 7200);
|
|
|
|
}
|
|
|
|
$mail_urls = array_column($site_array, 'main_url');
|
|
|
|
$key = array_search($website, $mail_urls);
|
|
|
|
if ($key !== false) {
|
|
|
|
// 分离项目 推送到测试链接
|
|
...
|
...
|
@@ -201,7 +201,7 @@ class postInquiry extends Command |
|
|
|
//兼容接口返回格式
|
|
|
|
if(!empty($res['data'][0]['status'])){
|
|
|
|
$res['data'][0]['code'] = $res['data'][0]['status'] == 'success' ? 200 : 400;
|
|
|
|
$res['message'] = $res['data'][0]['msg'];
|
|
|
|
!empty($res['data'][0]['msg']) && $res['message'] = $res['data'][0]['msg'];
|
|
|
|
}
|
|
|
|
if(empty($res['data'][0]['code']) || !in_array($res['data'][0]['code'], [200,300])){
|
|
|
|
$log->status = ReInquiryDetailLog::STATUS_FAIL;
|
...
|
...
|
|