Authored by Rock Zhang

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

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