|
...
|
...
|
@@ -168,14 +168,7 @@ class ProjectAssociationServices extends BaseService |
|
|
|
}
|
|
|
|
$param['sign'] = $this->getSign($param);
|
|
|
|
$url = 'https://hub.ai.cc/api/globalso_ai_customer_service/chatroom_list';
|
|
|
|
// $result = Http::withoutVerifying()->post($url, $param)->json();
|
|
|
|
$client = new \GuzzleHttp\Client();
|
|
|
|
$result = $client->request('POST', $url, [
|
|
|
|
'proxy' => env('CURL_PROXY'),
|
|
|
|
'json' => $param,
|
|
|
|
'verify' => false,
|
|
|
|
])->getBody()->getContents();
|
|
|
|
$result = json_decode($result, true);
|
|
|
|
$result = Http::withoutVerifying()->post($url, $param)->json();
|
|
|
|
if(empty($result) || $result['status'] != 200){
|
|
|
|
return [];
|
|
|
|
}
|
|
...
|
...
|
@@ -196,17 +189,7 @@ class ProjectAssociationServices extends BaseService |
|
|
|
];
|
|
|
|
$param['sign'] = $this->getSign($param);
|
|
|
|
$url = 'https://hub.ai.cc/api/globalso_ai_customer_service/send_msg';
|
|
|
|
|
|
|
|
// $result = Http::withoutVerifying()->post($url, $param)->json();
|
|
|
|
|
|
|
|
$client = new \GuzzleHttp\Client();
|
|
|
|
$result = $client->request('POST', $url, [
|
|
|
|
'proxy' => env('CURL_PROXY'),
|
|
|
|
'json' => $param,
|
|
|
|
'verify' => false,
|
|
|
|
])->getBody()->getContents();
|
|
|
|
$result = json_decode($result, true);
|
|
|
|
|
|
|
|
$result = Http::withoutVerifying()->timeout(10)->post($url, $param)->json();
|
|
|
|
if(empty($result) || $result['status'] != 200){
|
|
|
|
throw new \Exception($result['message'] ?? '');
|
|
|
|
}
|
...
|
...
|
|