Authored by Rock Zhang

优化限购商品购买判定接口的返回

Code Review By Rock Zhang
@@ -306,13 +306,10 @@ class IndexController extends AbstractAction @@ -306,13 +306,10 @@ class IndexController extends AbstractAction
306 if (isset($order['cartUrl'])) { // 普通或者预售商品为空时 306 if (isset($order['cartUrl'])) { // 普通或者预售商品为空时
307 $this->go($order['cartUrl']); 307 $this->go($order['cartUrl']);
308 } 308 }
309 - if (isset($order['error'])) { // 限购商品支付接口返回为空或错误时  
310 - if ($this->isAjax()) { 309 +
  310 + if ($this->isAjax()) { // 限购商品支付接口返回为空或错误时(异步请求)
311 $this->echoJson($order); 311 $this->echoJson($order);
312 return; 312 return;
313 - } else {  
314 - $this->error();  
315 - }  
316 } 313 }
317 314
318 $data = array( 315 $data = array(