优化限购商品购买判定接口的返回
Code Review By Rock Zhang
Showing
1 changed file
with
2 additions
and
5 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()) { | 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( |
-
Please register or login to post a comment