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
@@ -172,10 +172,10 @@ abstract class Subject extends Multiprogramming
$client->post($this->getUrl() . '?access_token=' . $access_token, $params);
$client->close();
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 {
+3 -3
View File
@@ -143,10 +143,10 @@ abstract class Template extends Multiprogramming
$client->post($this->getUrl() . '?access_token=' . $access_token, $params);
$client->close();
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']);
}