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)