|
@@ -168,14 +168,7 @@ class ProjectAssociationServices extends BaseService |
|
@@ -168,14 +168,7 @@ class ProjectAssociationServices extends BaseService |
|
168
|
}
|
168
|
}
|
|
169
|
$param['sign'] = $this->getSign($param);
|
169
|
$param['sign'] = $this->getSign($param);
|
|
170
|
$url = 'https://hub.ai.cc/api/globalso_ai_customer_service/chatroom_list';
|
170
|
$url = 'https://hub.ai.cc/api/globalso_ai_customer_service/chatroom_list';
|
|
171
|
-// $result = Http::withoutVerifying()->post($url, $param)->json();
|
|
|
|
172
|
- $client = new \GuzzleHttp\Client();
|
|
|
|
173
|
- $result = $client->request('POST', $url, [
|
|
|
|
174
|
- 'proxy' => env('CURL_PROXY'),
|
|
|
|
175
|
- 'json' => $param,
|
|
|
|
176
|
- 'verify' => false,
|
|
|
|
177
|
- ])->getBody()->getContents();
|
|
|
|
178
|
- $result = json_decode($result, true);
|
171
|
+ $result = Http::withoutVerifying()->post($url, $param)->json();
|
|
179
|
if(empty($result) || $result['status'] != 200){
|
172
|
if(empty($result) || $result['status'] != 200){
|
|
180
|
return [];
|
173
|
return [];
|
|
181
|
}
|
174
|
}
|
|
@@ -196,17 +189,7 @@ class ProjectAssociationServices extends BaseService |
|
@@ -196,17 +189,7 @@ class ProjectAssociationServices extends BaseService |
|
196
|
];
|
189
|
];
|
|
197
|
$param['sign'] = $this->getSign($param);
|
190
|
$param['sign'] = $this->getSign($param);
|
|
198
|
$url = 'https://hub.ai.cc/api/globalso_ai_customer_service/send_msg';
|
191
|
$url = 'https://hub.ai.cc/api/globalso_ai_customer_service/send_msg';
|
|
199
|
-
|
|
|
|
200
|
-// $result = Http::withoutVerifying()->post($url, $param)->json();
|
|
|
|
201
|
-
|
|
|
|
202
|
- $client = new \GuzzleHttp\Client();
|
|
|
|
203
|
- $result = $client->request('POST', $url, [
|
|
|
|
204
|
- 'proxy' => env('CURL_PROXY'),
|
|
|
|
205
|
- 'json' => $param,
|
|
|
|
206
|
- 'verify' => false,
|
|
|
|
207
|
- ])->getBody()->getContents();
|
|
|
|
208
|
- $result = json_decode($result, true);
|
|
|
|
209
|
-
|
192
|
+ $result = Http::withoutVerifying()->timeout(10)->post($url, $param)->json();
|
|
210
|
if(empty($result) || $result['status'] != 200){
|
193
|
if(empty($result) || $result['status'] != 200){
|
|
211
|
throw new \Exception($result['message'] ?? '');
|
194
|
throw new \Exception($result['message'] ?? '');
|
|
212
|
}
|
195
|
}
|