Authored by 陈峰

购物车bug修改

... ... @@ -10,5 +10,6 @@
<div class="cart-box">
</div>
<div class="recommend-for-you box hide"></div>
<div id="chose-panel"></div>
</div>
... ...
... ... @@ -88,12 +88,12 @@
{{/if}}
{{#if hasNoSaleGoods}}
<div class="disable-box box">
{{#notValidGoods}}
{{> cart-good}}
{{/notValidGoods}}
{{#offShelveGoods}}
{{> cart-good}}
{{/offShelveGoods}}
{{#notValidGoods}}
{{> cart-good}}
{{/notValidGoods}}
<div class="remove-all">
<button class="btn btn-remove">清空失效商品</button>
... ...
... ... @@ -39,6 +39,4 @@
</div>
{{/if}}
<input id="cartType" type="hidden" value="{{cartType}}">
<div class="recommend-for-you box hide">
</div>
{{/if}}
\ No newline at end of file
... ...
... ... @@ -117,7 +117,7 @@ let goodObj = {
let self = this;
if (!$(e.currentTarget).hasClass('checked') && $(e.delegateTarget).find('.low-stocks').length > 0) {
tip.show('库存不足,无法购买');
tip.show('您勾选的商品库存不足');
return false;
}
self.selectGood($(e.currentTarget));
... ... @@ -160,16 +160,22 @@ let goodObj = {
let checked = $(e.currentTarget).find('.chk.select').hasClass('checked');
if (checked) {
new Promise(resolve => {
let promise = self.clearLowStock();
if (promise) {
tip.show('您全选的商品中存在库存不足商品,已帮您自动取消勾选');
promise.then(() => {
self.selectGood($('.good-item:not(.low-stocks) .chk.select'), true);
resolve();
});
} else {
self.selectGood($('.good-item:not(.low-stocks) .chk.select'), true);
resolve();
}
}).then(() => {
if ($('.good-item.low-stocks').length) {
tip.show('您全选的商品中存在库存不足商品,已帮您自动取消勾选');
}
self.selectGood($('.good-item:not(.low-stocks) .chk.select'), true);
});
} else {
self.selectGood($('.good-item .chk.select'), false);
}
... ...
... ... @@ -298,6 +298,14 @@
}
}
.all-gift-box {
display: none;
}
.total {
display: none;
}
.cart-content.active {
.cart-footer {
.check-all {
... ...