Authored by 陈峰

Merge branch 'feature/cart' into 'release/5.4.1'

Feature/cart



See merge request !240
... ... @@ -10,5 +10,6 @@
<div class="cart-box">
</div>
<div class="recommend-for-you box hide"></div>
<div id="chose-panel"></div>
</div>
... ...
... ... @@ -129,7 +129,7 @@
</div>
<div class="opts bill ">
<div class="total">
<p class="price">总计:{{sumPrice}}&nbsp;&nbsp;({{count}}件)</p>
<p class="price">总计:¥{{sumPrice}}&nbsp;&nbsp;({{count}}件)</p>
<p class="intro">不含运费</p>
</div>
<button class="btn btn-red btn-balance">结算</button>
... ...
... ... @@ -52,7 +52,7 @@
<div class="count">x{{count}}</div>
</div>
<p class="price">
<span class="market-price">{{price}}</span>
<span class="market-price">¥{{price}}</span>
{{#if isStudents}}<span class="vip fill-text"></span>{{/if}}
{{#if isVipPrice}}<span class="vip fill-text">VIP</span>{{/if}}
</p>
... ...
... ... @@ -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) {
let promise = self.clearLowStock();
new Promise(resolve => {
let promise = self.clearLowStock();
if (promise) {
tip.show('您全选的商品中存在库存不足商品,已帮您自动取消勾选');
promise.then(() => {
self.selectGood($('.good-item:not(.low-stocks) .chk.select'), true);
});
} else {
if (promise) {
promise.then(() => {
resolve();
});
} else {
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 {
... ...
... ... @@ -20,7 +20,7 @@ const formatPromotionTitle = (promo) => {
if (promo.condition_unit === 1) {
title = `差${transPrice(Math.abs(promo.condition_value))}件立享`;
} else if (promo.condition_unit === 2) {
title = `差${transPrice(Math.abs(promo.condition_value))}立享`;
title = `差¥${transPrice(Math.abs(promo.condition_value))}立享`;
}
} else {
title = '已满足';
... ...