Authored by Rock Zhang

优化取消订单接口返回为nul时的提示信息

Code Review By Rock Zhang
... ... @@ -727,7 +727,9 @@ class HomeController extends AbstractAction
//调用取消订单接口,返回订单取消状态
$data = OrderData::cancelOrderData($orderCode, $uid, $gender, $channel);
//将取消状态返回至浏览器
if (empty($data['code']) && empty($data['message'])) {
if (!$data) {
$this->echoJson(array('message' => '取消订单失败'));
} else if (empty($data['code']) && empty($data['message'])) {
$this->echoJson(array('code' => 200));
} else {
$this->echoJson($data);
... ...