Authored by 梁志锋

Merge remote-tracking branch 'origin/master'

@@ -302,12 +302,13 @@ class IndexController extends AbstractAction @@ -302,12 +302,13 @@ class IndexController extends AbstractAction
302 // 返回地址 302 // 返回地址
303 $returnUrl = Helpers::url('/cart/index/index'); 303 $returnUrl = Helpers::url('/cart/index/index');
304 304
305 - $cartType = $this->get('cartType', ''); 305 + $cartType = $this->get('cartType', 'ordinary');
306 $cookieData = $this->getCookie('order-info', null); 306 $cookieData = $this->getCookie('order-info', null);
307 $orderInfo = array(); 307 $orderInfo = array();
308 if (!empty($cookieData)) { 308 if (!empty($cookieData)) {
309 $orderInfo = json_decode($cookieData, true); 309 $orderInfo = json_decode($cookieData, true);
310 - $cartType = $orderInfo['cartType']; 310 + //如果为空,获取默认
  311 + $cartType = empty($orderInfo['cartType']) ? $cartType : $orderInfo['cartType'];
311 } 312 }
312 313
313 // 如果传递了code, sku,skn,buy_number就代表是限购商品 314 // 如果传递了code, sku,skn,buy_number就代表是限购商品