Authored by 郝肖肖

套餐重新加入购物车

... ... @@ -227,7 +227,6 @@ const formatCartGoods = (cartGoods, isAdvanceCart, inValid, isOffShelves, analys
}
// 商品链接
// let cnAlphaBet = it.cn_alphabet ? it.cn_alphabet : md5(it.product_name);
goods.link = helpers.getUrlBySkc(it.product_id, it.goods_id, it.cn_alphabet);
return goods;
... ...
... ... @@ -15,7 +15,7 @@
data-promotionid="{{promotionId}}"
data-color="{{productColor}}"
data-size="{{productSize}}"
data-pool-type="{{../poolType}}"
data-pool-type="{{parent.poolType}}"
{{#if isGift}} data-isgift="true"{{/if}}
{{#if isPriceGift}} data-ispricegift="true"{{/if}}
{{#if parent.poolId}} data-pool-id="{{parent.poolId}}"{{/if}} >
... ... @@ -50,7 +50,10 @@
</span>
</em>
{{#and isAdvance preSellDate}}
<span class="presell">上市期:{{preSellDate}}</span>
<span class="presell">上市期:{{preSellDate}}</span>
{{/and}}
{{#and inValid storageNum}}
<span class="mark-bg-white cursor-p" data-role="readd2cart2">重新加入购物车</span>
{{/and}}
</p>
</div>
... ...
... ... @@ -5,7 +5,11 @@
data-pool-type="{{poolType}}"
data-pool-id="{{poolId}}">
<div class="pay-pro td line-height" style="width: 516px;">
<i class="cart-item-check iconfont {{#isChecked}}cart-item-checked checked{{/isChecked}}" data-role="cart-item-check" data-goodstype="ordinary" checked=""></i>
{{#if inValid}}
<i class="cart-item-disabled iconfont"></i>
{{^}}
<i class="cart-item-check iconfont {{#isChecked}}cart-item-checked checked{{/isChecked}}" data-role="cart-item-check" data-goodstype="ordinary" checked=""></i>
{{/if}}
<code class="cart-label">优惠套餐</code>
{{poolTitle}}
</div>
... ...
... ... @@ -421,6 +421,16 @@ Cart = {
isReAdd: true
});
},
reAdd2Cart2: function() {
var $this = $(this);
var $li = $this.closest('li');
capi.addcart({
productSku: $li.data('id'),
buyNumber: $li.data('productnum'),
promotionId: $li.data('promotionid')
});
},
reFav: function() {
var $this = $(this);
... ... @@ -503,6 +513,7 @@ $cartListWrap.on('click', '#Y_CartSelectDialog .btn-account', Cart.submitSingle)
// 重新加入购物车
$cartListWrap.on('click', '#Y_delReselWrap [data-role=readd2cart]', Cart.reAdd2Cart);
$cartListWrap.on('click', '[data-role=readd2cart2]', Cart.reAdd2Cart2);
$cartListWrap.on('click', '#Y_delReselWrap [data-role=reFav]', Cart.reFav);
// 失效商品的提示
... ...
... ... @@ -296,6 +296,10 @@
overflow: hidden;
height: 60px;
}
.cart-item-disabled {
top: 0 !important;
}
}
.is-check i {
... ... @@ -315,6 +319,21 @@
text-align: center;
}
span.mark-bg-white {
height: 18px;
line-height: 18px;
display: inline-block;
margin-right: 20px;
font-size: 12px;
font-weight: 300;
text-align: center;
color: #ff575c !important;
background-color: #fff;
border: 1px solid #ff575c;
box-sizing: border-box;
padding: 0 10px !important;
}
.pre-sell {
background: #fff;
color: #818181;
... ... @@ -763,6 +782,7 @@
padding-left: 15px;
padding-top: 0;
margin-left: 0;
width: 280px;
a {
display: block;
... ... @@ -863,6 +883,10 @@
}
}
.cursor-p {
cursor: pointer;
}
.goods-choose-box {
position: absolute;
top: -20px;
... ...