This commit is contained in:
2026-06-12 23:57:22 +08:00
parent 0a535c3a89
commit 63e24922ad
15 changed files with 39 additions and 39 deletions
+3 -3
View File
@@ -56,10 +56,10 @@ class Result
*/
public static function init(Client $client): static
{
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
return new Result(code: 505, message: $client->getBody());
if (!in_array($client->statusCode, [101, 200, 201])) {
return new Result(code: 505, message: $client->body);
}
$body = json_decode($client->getBody(), true);
$body = json_decode($client->body, true);
if (isset($body['errcode']) && $body['errcode'] != 0) {
return new Result(code: $body['errcode'], message: $body['errmsg']);
} else {