Authored by 陈峰

Merge branch 'hotfix/presale-cart-message' into 'release/6.8.6'

预售商品增减时不显示预售提示



See merge request !425
... ... @@ -203,7 +203,6 @@ const cart = (req, res, next) => {
req.ctx(service).getCartData(uid, shoppingKey)
.then(ret => {
return res.render('cart', {
title: '购物车 | ' + (res.locals.title || ''),
module: 'cart',
... ...
... ... @@ -119,7 +119,6 @@ const getCartDelList = (req, res, addsStr, delSkuId) => {
* @return array 处理之后的购物车商品数据
*/
const formatCartGoods = (cartGoods, isAdvanceCart, inValid, isOffShelves, analysis) => {
return _.map(cartGoods, (it) => {
let goods = {
id: it.product_sku,
... ... @@ -142,7 +141,8 @@ const formatCartGoods = (cartGoods, isAdvanceCart, inValid, isOffShelves, analys
productSubtotal: transPrice(it.last_vip_price * it.buy_number),
promotionId: it.promotion_id || 0,
isLimitSkn: it.is_limit_skn === 'Y', // is_limit_skn=Y 不支持7天无理由退货
isAdvance: isAdvanceCart
isAdvance: isAdvanceCart,
saleTimeStr: !!it.sale_time_str
};
// 划线的价格
... ... @@ -435,7 +435,6 @@ const formatPoolPromotionInfos = (infoList, selectedGiftsList) => {
* 格式化子优惠池信息,返回商品列表,子优惠列表放在每个商品中
*/
const formatSubPromotionPools = (pools, selectedGiftsList, isAdvance, analysis) => {
let goodsListPool = _.map(pools, p => {
let pool = {
poolType: p.pool_type,
... ... @@ -539,7 +538,6 @@ const formatSoldOutPools = (pools, selectedGiftsList, isAdvance, analysis) => {
};
const formatCart = (cartDataRet, uid, shoppingKey, cartDelList) => {
let analysisData = {
ids: [],
criteo: []
... ...
<li class="pre-sell-box tr
{{#saleTimeStr}}presale{{/saleTimeStr}}
{{#isChecked}}active{{/isChecked}}
{{#inValid}}tr-disabled {{#unless sku}}tr-disabled-none{{/unless}}{{/inValid}}
{{#isSamebrandWithNext}} tr-group {{/isSamebrandWithNext}}"
... ... @@ -25,7 +26,7 @@
{{#if inValid}}
<i class="cart-item-disabled iconfont"></i>
{{else}}
<i class="cart-item-check iconfont {{#isChecked}}cart-item-checked{{/isChecked}}"
<i class="cart-item-check iconfont {{#isChecked}}cart-item-checked{{/isChecked}} {{#saleTimeStr}}presale{{/saleTimeStr}}"
data-role="cart-item-check"
data-goodstype="{{goodsType}}"
{{#isTipNoStore}}data-tipnostore="true"{{/isTipNoStore}}
... ...
... ... @@ -90,6 +90,7 @@
</div>
{{#pools}}
<div class="promotion-pool {{#unless @first}}mt20{{/unless}}" data-role="promotion-pool">
{{#eq poolType 3}}
{{>mix/cart/cart-pool-title}}
... ...
... ... @@ -471,7 +471,6 @@ Cart = {
var oprType = $this.hasClass('minus') ? 'decreaseNum' : 'increaseNum';
countJSON[oprType] = 1;
if ($this.siblings('input').val() === '1' && $this.hasClass('minus')) {
return false;
}
... ... @@ -486,7 +485,7 @@ Cart = {
activity_id: $item.data('pool-id')
}));
if (!$btn.hasClass('cart-item-checked')) {
if (!$btn.hasClass('cart-item-checked') && !$btn.hasClass('presale')) {
$btn.click();
}
},
... ...
... ... @@ -140,7 +140,6 @@ function refreshCart(data) {
// checkbox提交ajax
function choiceOut(items) {
var skuList = $.isArray(items) ? items : [items];
var hasPromotion = false;
... ... @@ -238,7 +237,6 @@ cartItemNumChg = (function() {
url: '/cart/cart/modifyNum',
data: data
}).then(function(d) {
if (d.code === 200) {
refreshCart(d.data);
} else {
... ...