Authored by 刘传洋

m

... ... @@ -75,7 +75,10 @@ const cart = (req, res, next) => {
let cartDelList = req.cookies['cart-del-list'];
if (cartDelList) {
res.cookie('cart-del-list', '');
res.cookie('cart-del-list', '', {
domain: '.yohobuy.com',
path: '/'
});
}
service.getCartData(uid, shoppingKey, cartDelList)
... ...
... ... @@ -378,6 +378,7 @@ const formatSubPromotionPools = (pools, selectedGiftsList, isAdvance) => {
let goodsListPool = _.map(pools, p => {
let pool = {
poolType: p.pool_type,
isBrandGroup: Number(p.pool_type) === 1,
goodsList: formatCartGoods(p.goods_list, isAdvance),
promotionInfos: formatPoolPromotionInfos(p.promotion_list, selectedGiftsList)
};
... ...
... ... @@ -25,7 +25,7 @@
<div class="shop-cart-empty">
<i class="iconfont"></i>
<p>购物车空空的哦,去看看心仪的商品吧~</p>
<a href="#">去购物</a>
<a href="{{listUrl}}">去购物</a>
</div>
</div>
<div class="dev-revocation {{#unless cart.deleteShop}}none{{/unless}}">
... ... @@ -51,7 +51,7 @@
<div class="pay-wapper">
<div class="cart-title">
<p class="left" style="width:6%;">
<i class="cart-item-check iconfont cart-item-checked"></i>&nbsp;&nbsp;全选
<i class="cart-item-check iconfont"></i>&nbsp;&nbsp;全选
</p>
<p style="width:35%">商品信息</p>
<p style="width:14%">单价</p>
... ... @@ -115,7 +115,7 @@
{{#pools}}
<div class="promotion-pool" data-role="promotion-pool">
{{#if promotionInfos}}
<div class="gift-sell mt40">
<div class="gift-sell mt20">
{{#promotionInfos}}
<div class="gift-sell-info"
data-role="promotion-wrap"
... ... @@ -167,23 +167,27 @@
{{/pools}}
{{#if offShelves}}
<div class="cart-table">
<ul class="table">
{{#offShelves}}
{{> cart-item}}
{{/offShelves}}
</ul>
<div class="mt20">
<div class="cart-table">
<ul class="table">
{{#offShelves}}
{{> cart-item}}
{{/offShelves}}
</ul>
</div>
</div>
{{/if}}
<!-- -->
{{#if soldOuts}}
<div class="cart-table">
<ul class="table">
{{#soldOuts}}
{{> cart-item}}
{{/soldOuts}}
</ul>
<div class="mt20">
<div class="cart-table">
<ul class="table">
{{#soldOuts}}
{{> cart-item}}
{{/soldOuts}}
</ul>
</div>
</div>
{{/if}}
... ... @@ -308,7 +312,7 @@
<p class="cart-del-goods-title">已删除商品,您可以重新购买或移入收藏:</p>
<ul id="Y_delReselWrap">
{{#each deleteShop}}
<li data-skn="{{productSku}}"
<li data-sku="{{productSku}}"
data-promotionid="{{promotionId}}"
data-num="{{productNum}}">
<span class="good-name" style="width: 392px;">{{productTitle}}</span>
... ...
... ... @@ -272,7 +272,7 @@
<div class="go-full-cart">
<div>
<p>购物车里还有22件商品</p>
<a href="//www.yohobuy.com/shopping/cart">去购物车结算</a>
<a href="//www.yohobuy.com/shopping/cart">查看我的购物车</a>
</div>
</div>
</div>
... ...
... ... @@ -112,7 +112,7 @@ Cart = {
if (!$this.data('gift')) {
countJSON = {
productPrice: $item.find('.productPrice').text(),
productPrice: $item.find('.product-price').text(),
productTitle: $item.find('.pay-pro-info a').text(),
link: $item.find('.pay-pro-info a').attr('href'),
productNum: $item.data('productnum'),
... ... @@ -122,7 +122,7 @@ Cart = {
}
new RConfirm(content, function() {
capi.cartItemDel(selectArray, true, countJSON);
capi.cartItemDel(selectArray, true, [countJSON]);
});
/* new RConfirm({
... ... @@ -366,6 +366,7 @@ $payWapper.on('click', 'li[data-role="pitem"] .cart-item-check', Cart.toggleSele
$payWapper.on('click', '[data-role=cart-del-btn]', Cart.del); // 删除商品
$payWapper.on('click', '[data-role=cart-mov2fav-btn]', Cart.toFav); // 移入收藏夹
$payWapper.on('click', '.minus, .plus', Cart.modNum); // 修改购物车数量
$payWapper.on('click', '.cart-title .cart-item-check', Cart.toggleSelectAll); // 全选
$cartnewSum.on('click', '.cart-item-check', Cart.toggleSelectAll); // 全选
$cartnewSum.on('click', '.delete-all-sel', Cart.delAll); // 批量删除商品
$cartnewSum.on('click', '.remove-all-2fav', Cart.toFavAll); // 批量移入收藏夹商品
... ...
... ... @@ -27,8 +27,10 @@ function isCheckAll() {
$('[data-role=pitem] [data-role=cart-item-check]').each(function() {
var $chk = $(this);
// 有一个没选中,跳出循环
if (!$(this).hasClass('cart-item-checked')) {
if (!$(this).hasClass('cart-item-checked') && !$chk.data('tipnostore')) {
isAllCheck = false;
return false;
}
... ...
... ... @@ -84,7 +84,7 @@
}
.mt20 {
margin-top: 40px;
margin-top: 20px;
}
.mt30 {
... ... @@ -92,7 +92,7 @@
}
.mt40 {
margin-top: 20px;
margin-top: 40px;
}
.mb20 {
... ...