...
|
...
|
@@ -392,12 +392,12 @@ const formatPromotion = (it, selectedGiftsList) => { |
|
|
info.giftGoodsList = checkGoodsIsSel(info.giftGoodsList, info.promotionId, selectedGiftsList);
|
|
|
|
|
|
if (status === 0) {
|
|
|
let tipTxt = `差${ -1 * info.conditionValue}`;
|
|
|
let tipTxt = `差${ - Math.round(info.conditionValue * 100)/100}`;
|
|
|
|
|
|
if (info.conditionUnit === 1) {
|
|
|
tipTxt += '件';
|
|
|
tipTxt += '件 ';
|
|
|
} else if (info.conditionUnit === 2) {
|
|
|
tipTxt += '元';
|
|
|
tipTxt += '元 ';
|
|
|
}
|
|
|
|
|
|
info.promotionTitle = tipTxt + info.promotionTitle;
|
...
|
...
|
@@ -573,17 +573,18 @@ const formatCart = (cartDataRet, uid, shoppingKey, cartDelList) => { |
|
|
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 orderAmount = (parseFloat(_.get(advStat, 'orderAmount', 0)) +
|
|
|
parseFloat(_.get(ordStat, 'orderAmount', 0))).toFixed(2);
|
|
|
let lastOrderAmount = (parseFloat(_.get(advStat, 'lastOrderAmount', 0)) +
|
|
|
parseFloat(_.get(ordStat, 'lastOrderAmount', 0))).toFixed(2);
|
|
|
|
|
|
if (result.ordinaryCart) {
|
|
|
result.ordinaryCart.hasGlobalBlock = hasGifts || hasPrices || hasPromo;
|
|
|
}
|
|
|
result.stat = {
|
|
|
orderAmount: (parseFloat(_.get(advStat, 'orderAmount', 0)) +
|
|
|
parseFloat(_.get(ordStat, 'orderAmount', 0))).toFixed(2),
|
|
|
discountAmount: (parseFloat(_.get(advStat, 'discountAmount', 0)) +
|
|
|
parseFloat(_.get(ordStat, 'discountAmount', 0))).toFixed(2),
|
|
|
lastOrderAmount: (parseFloat(_.get(advStat, 'lastOrderAmount', 0)) +
|
|
|
parseFloat(_.get(ordStat, 'lastOrderAmount', 0))).toFixed(2),
|
|
|
orderAmount: orderAmount ,
|
|
|
lastOrderAmount: lastOrderAmount,
|
|
|
discountAmount: orderAmount - lastOrderAmount,
|
|
|
gainYohoCoin: parseFloat(_.get(advStat, 'gainYohoCoin', 0)) + parseFloat(_.get(ordStat, 'gainYohoCoin', 0)),
|
|
|
goodsCount: _.get(advStat, 'goodsCount', 0) + _.get(ordStat, 'goodsCount', 0),
|
|
|
selectedGoodsCount: _.get(advStat, 'selectedGoodsCount', 0) + _.get(ordStat, 'selectedGoodsCount', 0)
|
...
|
...
|
|