Authored by 毕凯

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

... ... @@ -50,7 +50,7 @@ class CartModel
*/
public static function getCartData($uid, $shoppingKey, $cartType = 'all', $onlyGift = false, $onlyAdvanceBuy = false)
{
$result = array('cartNav' => true);
$result = array('cartNav' => true, 'commonGoodsCount' => '0', 'presellGoodsCount' => '0');
// 用户是否登录
if (empty($uid)) {
... ... @@ -73,10 +73,10 @@ class CartModel
break;
}
$ordinaryCount = intval($cart['ordinary_cart_data']['shopping_cart_data']['goods_count']);
$advanceCount = intval($cart['advance_cart_data']['shopping_cart_data']['goods_count']);
$ordinaryCount = strval($cart['ordinary_cart_data']['shopping_cart_data']['goods_count']);
$advanceCount = strval($cart['advance_cart_data']['shopping_cart_data']['goods_count']);
// 普通购物车和预售购物车都为空
if ($ordinaryCount === 0 && $advanceCount === 0) {
if ($ordinaryCount === '0' && $advanceCount === '0') {
$result['isEmptyCart'] = true;
break;
}
... ... @@ -87,7 +87,7 @@ class CartModel
/* 预售购物车 */
$result['presellGoodsCount'] = $advanceCount;
$result['preSellCart'] = self::procCartData($cart['advance_cart_data'], $onlyGift, $onlyAdvanceBuy);
}while(0);
} while(false);
return $result;
}
... ... @@ -156,8 +156,8 @@ class CartModel
if (empty($uid)) {
$result['code'] = 300;
$reult['message'] = '请先登录';
$result['data'] = '/signin.html';
$result['message'] = '请先登录';
$result['data'] = Helpers::url('/signin.html');
return $result;
}
... ...