...
|
...
|
@@ -68,6 +68,7 @@ const formatCartGoods = (cartGoods, isAdvanceCart, inValid, isOffShelves, analys |
|
|
id: it.product_sku,
|
|
|
skn: it.product_skn,
|
|
|
pid: it.product_id,
|
|
|
brandId: it.brand_id,
|
|
|
isChecked: it.selected === 'Y',
|
|
|
productTitle: it.product_name,
|
|
|
imgCover: it.goods_images ? helpers.image(it.goods_images, 64, 88) : '',
|
...
|
...
|
@@ -376,6 +377,7 @@ const formatSubPromotionPools = (pools, selectedGiftsList, isAdvance) => { |
|
|
|
|
|
let goodsListPool = _.map(pools, p => {
|
|
|
let pool = {
|
|
|
poolType: p.pool_type,
|
|
|
goodsList: formatCartGoods(p.goods_list, isAdvance),
|
|
|
promotionInfos: formatPoolPromotionInfos(p.promotion_list, selectedGiftsList)
|
|
|
};
|
...
|
...
|
@@ -393,7 +395,9 @@ const formatSubPromotionPools = (pools, selectedGiftsList, isAdvance) => { |
|
|
});
|
|
|
|
|
|
// [ [goods, goods], [goods, ..], [] ] => [goods, goods ]
|
|
|
return _.flatten(goodsListPool);
|
|
|
// return _.flatten(goodsListPool);
|
|
|
|
|
|
return goodsListPool;
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -411,11 +415,12 @@ const formatPromotionPools = (pools, selectedGiftsList, isAdvance) => { |
|
|
};
|
|
|
|
|
|
if (p.sub_pool) {
|
|
|
let goodsWithPromotion = formatSubPromotionPools(p.sub_pool, selectedGiftsList, isAdvance);
|
|
|
pool.subs = formatSubPromotionPools(p.sub_pool, selectedGiftsList, isAdvance);
|
|
|
|
|
|
/*
|
|
|
if (_.isArray(goodsWithPromotion) && goodsWithPromotion.length) {
|
|
|
pool.goodsList = goodsWithPromotion.concat(pool.goodsList);
|
|
|
}
|
|
|
}*/
|
|
|
}
|
|
|
|
|
|
return pool;
|
...
|
...
|
|