作者 赵彬吉

update

... ... @@ -35,7 +35,12 @@ class OaGlobalsoApi
public function order_info($order_id)
{
$api_url = $this->url . '/api/order_info?token='.$this->token.'&order_id='.$order_id;
$res = http_get($api_url,["charset" => "UTF-8"]);
// $res = http_get($api_url,["charset" => "UTF-8"]);
$client = new \GuzzleHttp\Client();
$data = $client->request('GET', $api_url, [
'proxy' => env('CURL_PROXY'), // 代理服务器地址和端口号
])->getBody()->getContents();
$res = json_decode($data, true);
return $res;
}
... ... @@ -53,7 +58,11 @@ class OaGlobalsoApi
];
try {
$res = HttpUtils::get($api_url, $params);
// $res = HttpUtils::get($api_url, $params);
$client = new \GuzzleHttp\Client();
$res = $client->request('GET', $api_url .'?'. http_build_query($params), [
'proxy' => env('CURL_PROXY'), // 代理服务器地址和端口号
])->getBody()->getContents();
$res = Arr::s2a($res);
} catch (\Exception | GuzzleException $e) {
errorLog('渠道信息', $params, $e);
... ...