From fcae22fb7549301022b91ee2c49aba0e4e9381b1 Mon Sep 17 00:00:00 2001 From: elf <360197197@qq.com> Date: Fri, 22 Apr 2022 09:12:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tool/GameResource/MhxlClient.class.php | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/Application/Base/Tool/GameResource/MhxlClient.class.php b/Application/Base/Tool/GameResource/MhxlClient.class.php index 7400cc529..a5a38dc3c 100644 --- a/Application/Base/Tool/GameResource/MhxlClient.class.php +++ b/Application/Base/Tool/GameResource/MhxlClient.class.php @@ -64,7 +64,7 @@ class MhxlClient ]); $result = (string)$response->getBody(); Log::info('Mhxl ' . json_encode($params) . ' ' . $result); - return $this->prepareResult($result); + return json_decode($result, true); } protected function get($uri, array $params = []) @@ -75,22 +75,7 @@ class MhxlClient ]); $result = (string)$response->getBody(); Log::info('Mhxl ' . json_encode($params) . ' ' . $result); - return $this->prepareResult($result); - } - - protected function prepareResult($result) - { - if ($result == 'SUCCESS') { - return [ - 'code' => 0, - 'msg' => $result, - ]; - } else { - return [ - 'code' => 1, - 'msg' => $result, - ]; - } + return json_decode($result, true); } protected function sign($name, $params)