Authored by biao

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

... ... @@ -93,7 +93,7 @@ $addressForm.on('submit', function() {
loading.hideLoadingMask();
} else {
if (queryString.refer === 'shopping') {
window.location.href = '/shoppingCart/selectAddress';
window.location.href = '/cart/index/selectAddress';
} else {
window.location.href = '/home/address';
}
... ...
... ... @@ -43,6 +43,7 @@ optHammer.on('tap', function(e) {
$('#dialog-wrapper').hide();
if (!res) {
tip.show('网络错误');
return;
}
if (res.code === 200) {
tip.show('删除成功');
... ... @@ -74,6 +75,7 @@ optHammer.on('tap', function(e) {
$('#dialog-wrapper').hide();
if (!res) {
tip.show('网络错误');
return;
}
if (res.code === 200) {
tip.show('取消成功');
... ...
... ... @@ -80,7 +80,7 @@
}
.price {
margin-left: 10rem / $pxConvertRem;
// margin-left: 10rem / $pxConvertRem;
font-size: 24rem / $pxConvertRem;
color: #f1545b;
... ...
... ... @@ -6,13 +6,9 @@
<div class="deps">
<p class="name row">{{name}}</p>
<p class="row">
<span class="price">
¥{{#if price}}{{price}}{{else}}{{marketPrice}}{{/if}}
</span>
<span class="price">&yen;{{#if price}}{{price}}{{else}}{{marketPrice}}{{/if}}</span>
{{#if price}}
<span class="price market-price">
¥{{marketPrice}}
</span>
<span class="price market-price">&yen;{{marketPrice}}</span>
{{/if}}
<span class="count">
×{{count}}
... ...
... ... @@ -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,21 +73,21 @@ 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;
}
/* 普通购物车 */
$result['commonGoodsCount'] = $ordinaryCount;
$result['commonCart'] = self::procCartData($cart['ordinary_cart_data'], $onlyGift, $onlyAdvanceBuy);
/* 预售购物车 */
$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;
}
... ...