Authored by 刘传洋

m

... ... @@ -140,7 +140,7 @@ const formatCartGoods = (cartGoods, isAdvanceCart, inValid, isOffShelves, analys
if (it.min_buy_number) {
goods.minBuyNumber = Number(it.min_buy_number);
if(goods.minBuyNumber > 1) {
if (goods.minBuyNumber > 1) {
goods.tipMessage = goods.minBuyNumber + '件起购';
}
}
... ... @@ -598,12 +598,19 @@ const formatCart = (cartDataRet, uid, shoppingKey, cartDelList) => {
if (!result.advanceCart && !result.ordinaryCart) {
result.isEmpty = true;
return result;
}
if(_.get(result, 'ordinaryCart.promotionInfos')) {
result.ordinaryCart.promotionInfos = _.filter(result.ordinaryCart.promotionInfos, pinfo => {
return pinfo && pinfo.tag && pinfo.promotionId > 0;
});
}
// promotionInfos, gifts, priceGifts 放一起展示
let hasGifts = result.ordinaryCart.gifts && result.ordinaryCart.gifts.length;
let hasPrices = result.ordinaryCart.priceGifts && result.ordinaryCart.priceGifts.length;
let hasPromo = result.ordinaryCart.promotionInfos && result.ordinaryCart.promotionInfos.length;
let hasGifts = _.get(result, 'ordinaryCart.gifts') && _.get(result, 'ordinaryCart.gifts').length;
let hasPrices = _.get(result, 'ordinaryCart.priceGifts') && _.get(result, 'ordinaryCart.priceGifts').length;
let hasPromo = _.get(result, 'ordinaryCart.promotionInfos') && _.get(result, 'ordinaryCart.promotionInfos').length;
let orderAmount = (parseFloat(_.get(advStat, 'orderAmount', 0)) +
parseFloat(_.get(ordStat, 'orderAmount', 0))).toFixed(2);
let lastOrderAmount = (parseFloat(_.get(advStat, 'lastOrderAmount', 0)) +
... ...