优化限购商品购买判定接口的返回
Code Review By Rock Zhang
Showing
1 changed file
with
4 additions
and
7 deletions
@@ -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()) { | ||
311 | - $this->echoJson($order); | ||
312 | - return; | ||
313 | - } else { | ||
314 | - $this->error(); | ||
315 | - } | 309 | + |
310 | + if ($this->isAjax()) { // 限购商品支付接口返回为空或错误时(异步请求) | ||
311 | + $this->echoJson($order); | ||
312 | + return; | ||
316 | } | 313 | } |
317 | 314 | ||
318 | $data = array( | 315 | $data = array( |
-
Please register or login to post a comment