From 96987222aa2f5e25b3e16a75d6e975ae3f92e43a Mon Sep 17 00:00:00 2001 From: Jing Li Date: Sat, 30 Dec 2023 23:56:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E5=8D=83=E9=87=8C=E7=9C=BC?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E9=94=99=E8=AF=AF=E7=A0=8111504=E6=97=B6,?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E5=8F=91=E8=B5=B7=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Iot/Qly/HttpClient.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Iot/Qly/HttpClient.php b/app/Iot/Qly/HttpClient.php index 5fde51b..6925755 100644 --- a/app/Iot/Qly/HttpClient.php +++ b/app/Iot/Qly/HttpClient.php @@ -40,6 +40,7 @@ class HttpClient protected function request(string $method, string $url, array $options = []): array { + beginning: $data = []; if (array_key_exists('json', $options)) { $data = $options['json']; @@ -75,6 +76,9 @@ class HttpClient $resultCode = data_get($result, 'resultCode', '-1'); if ($resultCode === '000000') { return $result; + } elseif ($resultCode === '11504') { + $this->token(true); + goto beginning; } throw new QlyException(