移动千里眼出现错误码11504时,重新发起请求
parent
53c44e8165
commit
96987222aa
|
|
@ -40,6 +40,7 @@ class HttpClient
|
||||||
|
|
||||||
protected function request(string $method, string $url, array $options = []): array
|
protected function request(string $method, string $url, array $options = []): array
|
||||||
{
|
{
|
||||||
|
beginning:
|
||||||
$data = [];
|
$data = [];
|
||||||
if (array_key_exists('json', $options)) {
|
if (array_key_exists('json', $options)) {
|
||||||
$data = $options['json'];
|
$data = $options['json'];
|
||||||
|
|
@ -75,6 +76,9 @@ class HttpClient
|
||||||
$resultCode = data_get($result, 'resultCode', '-1');
|
$resultCode = data_get($result, 'resultCode', '-1');
|
||||||
if ($resultCode === '000000') {
|
if ($resultCode === '000000') {
|
||||||
return $result;
|
return $result;
|
||||||
|
} elseif ($resultCode === '11504') {
|
||||||
|
$this->token(true);
|
||||||
|
goto beginning;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new QlyException(
|
throw new QlyException(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue