Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
3 changed files
with
12 additions
and
11 deletions
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | left: 0; | 7 | left: 0; |
8 | right: 100rem / $pxConvertRem; | 8 | right: 100rem / $pxConvertRem; |
9 | width: 540rem / $pxConvertRem; | 9 | width: 540rem / $pxConvertRem; |
10 | - z-index: 1; | 10 | + z-index: 4; |
11 | overflow: hidden; | 11 | overflow: hidden; |
12 | @include transition(all .3s); | 12 | @include transition(all .3s); |
13 | 13 | ||
@@ -188,4 +188,4 @@ | @@ -188,4 +188,4 @@ | ||
188 | display: block; | 188 | display: block; |
189 | @include transform(translateX(0)); | 189 | @include transform(translateX(0)); |
190 | @include transition(transform 0.3s); | 190 | @include transition(transform 0.3s); |
191 | -} | ||
191 | +} |
@@ -324,6 +324,12 @@ class CartModel | @@ -324,6 +324,12 @@ class CartModel | ||
324 | 324 | ||
325 | $pay = CartData::cartPay($uid, $cartType); | 325 | $pay = CartData::cartPay($uid, $cartType); |
326 | 326 | ||
327 | + // 商品为空返回 | ||
328 | + if (!$pay || (isset($pay['data']['goods_list']) && empty($pay['data']['goods_list']))) { | ||
329 | + $result['cartUrl'] = Helpers::url('/cart/index/index'); | ||
330 | + return $result; | ||
331 | + } | ||
332 | + | ||
327 | if ($pay && isset($pay['code']) && $pay['code'] === 200) { | 333 | if ($pay && isset($pay['code']) && $pay['code'] === 200) { |
328 | $payReturn = $pay['data']; | 334 | $payReturn = $pay['data']; |
329 | $address = array(); | 335 | $address = array(); |
@@ -283,22 +283,17 @@ class IndexController extends AbstractAction | @@ -283,22 +283,17 @@ class IndexController extends AbstractAction | ||
283 | $orderInfo = json_decode($cookieData, true); | 283 | $orderInfo = json_decode($cookieData, true); |
284 | $cartType = $orderInfo['cartType']; | 284 | $cartType = $orderInfo['cartType']; |
285 | } | 285 | } |
286 | - $cartKey = 'commonCart'; | ||
287 | - if ($cartType === 'advance') { | ||
288 | - $cartKey = 'preSellCart'; | ||
289 | - } | ||
290 | 286 | ||
291 | - $shoppingKey = Helpers::getShoppingKeyByCookie(); | ||
292 | $uid = $this->getUid(true); | 287 | $uid = $this->getUid(true); |
293 | - $cartGoods = CartModel::getCartData($uid, $shoppingKey); | ||
294 | - if (isset($cartGoods['isEmptyCart']) || empty($cartGoods[$cartKey])) { | ||
295 | - $this->go(Helpers::url('/cart/index/index')); | 288 | + $order = CartModel::cartPay($uid, $cartType, $orderInfo); |
289 | + if (isset($order['cartUrl'])) { | ||
290 | + $this->go($order['cartUrl']); | ||
296 | } | 291 | } |
297 | 292 | ||
298 | $data = array( | 293 | $data = array( |
299 | 'orderEnsurePage' => true, | 294 | 'orderEnsurePage' => true, |
300 | 'isOrdinaryCart' => ($cartType !== 'advance'), | 295 | 'isOrdinaryCart' => ($cartType !== 'advance'), |
301 | - 'orderEnsure' => CartModel::cartPay($uid, $cartType, $orderInfo) | 296 | + 'orderEnsure' => $order |
302 | ); | 297 | ); |
303 | 298 | ||
304 | $this->_view->display('order-ensure', $data); | 299 | $this->_view->display('order-ensure', $data); |
-
Please register or login to post a comment