...
|
...
|
@@ -241,7 +241,6 @@ let getProductData = (data) => { |
|
|
productList: productProcess.processProductList(bundleData && bundleData.productList)
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* 量贩 */
|
|
|
if (bundleData && _.get(bundleData, 'bundleInfo.discountType', null) === 2) {
|
|
|
finalResult.discountBuy = {
|
...
|
...
|
@@ -502,9 +501,11 @@ let getNewProductAsyncData = (data) => { |
|
|
}
|
|
|
finalResult.isStudent = data.isStudent;
|
|
|
|
|
|
let discountBuy = _.find(bundleData, bund => _.get(bund, 'bundleInfo.discountType') === 2);
|
|
|
|
|
|
/* 量贩 */
|
|
|
if (bundleData && _.get(bundleData, 'bundleInfo.discountType', null) === 2) {
|
|
|
let minBuyNum = _.get(bundleData, 'bundleInfo.bundleCount', 1);
|
|
|
if (bundleData && discountBuy) {
|
|
|
let minBuyNum = discountBuy.bundleInfo.bundleCount;
|
|
|
let isNotEnough = true;
|
|
|
|
|
|
// 是否满足量贩购买要求:剩余商品数量大于量贩最小购买量
|
...
|
...
|
@@ -523,8 +524,8 @@ let getNewProductAsyncData = (data) => { |
|
|
|
|
|
finalResult.discountBuy = {
|
|
|
num: minBuyNum,
|
|
|
promotionPhrase: _.get(bundleData, 'bundleInfo.promotionPhrase', ''),
|
|
|
discount: _.get(bundleData, 'bundleInfo.discount', '')
|
|
|
promotionPhrase: discountBuy.bundleInfo.promotionPhrase,
|
|
|
discount: discountBuy.bundleInfo.discount
|
|
|
};
|
|
|
}
|
|
|
return finalResult;
|
...
|
...
|
|