Merge pull request '优化' (#654) from feature/testing_apply_top_promote into master

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/654
master
廖金灵 3 years ago
commit 2f09f413c0

@ -64,7 +64,7 @@ class MhxlClient
]); ]);
$result = (string)$response->getBody(); $result = (string)$response->getBody();
Log::info('Mhxl ' . json_encode($params) . ' ' . $result); Log::info('Mhxl ' . json_encode($params) . ' ' . $result);
return $this->prepareResult($result); return json_decode($result, true);
} }
protected function get($uri, array $params = []) protected function get($uri, array $params = [])
@ -75,22 +75,7 @@ class MhxlClient
]); ]);
$result = (string)$response->getBody(); $result = (string)$response->getBody();
Log::info('Mhxl ' . json_encode($params) . ' ' . $result); Log::info('Mhxl ' . json_encode($params) . ' ' . $result);
return $this->prepareResult($result); return json_decode($result, true);
}
protected function prepareResult($result)
{
if ($result == 'SUCCESS') {
return [
'code' => 0,
'msg' => $result,
];
} else {
return [
'code' => 1,
'msg' => $result,
];
}
} }
protected function sign($name, $params) protected function sign($name, $params)

Loading…
Cancel
Save