|
@@ -241,7 +241,6 @@ let getProductData = (data) => { |
|
@@ -241,7 +241,6 @@ let getProductData = (data) => { |
241
|
productList: productProcess.processProductList(bundleData && bundleData.productList)
|
241
|
productList: productProcess.processProductList(bundleData && bundleData.productList)
|
242
|
};
|
242
|
};
|
243
|
}
|
243
|
}
|
244
|
-
|
|
|
245
|
/* 量贩 */
|
244
|
/* 量贩 */
|
246
|
if (bundleData && _.get(bundleData, 'bundleInfo.discountType', null) === 2) {
|
245
|
if (bundleData && _.get(bundleData, 'bundleInfo.discountType', null) === 2) {
|
247
|
finalResult.discountBuy = {
|
246
|
finalResult.discountBuy = {
|
|
@@ -502,9 +501,11 @@ let getNewProductAsyncData = (data) => { |
|
@@ -502,9 +501,11 @@ let getNewProductAsyncData = (data) => { |
502
|
}
|
501
|
}
|
503
|
finalResult.isStudent = data.isStudent;
|
502
|
finalResult.isStudent = data.isStudent;
|
504
|
|
503
|
|
|
|
504
|
+ let discountBuy = _.find(bundleData, bund => _.get(bund, 'bundleInfo.discountType') === 2);
|
|
|
505
|
+
|
505
|
/* 量贩 */
|
506
|
/* 量贩 */
|
506
|
- if (bundleData && _.get(bundleData, 'bundleInfo.discountType', null) === 2) {
|
|
|
507
|
- let minBuyNum = _.get(bundleData, 'bundleInfo.bundleCount', 1);
|
507
|
+ if (bundleData && discountBuy) {
|
|
|
508
|
+ let minBuyNum = discountBuy.bundleInfo.bundleCount;
|
508
|
let isNotEnough = true;
|
509
|
let isNotEnough = true;
|
509
|
|
510
|
|
510
|
// 是否满足量贩购买要求:剩余商品数量大于量贩最小购买量
|
511
|
// 是否满足量贩购买要求:剩余商品数量大于量贩最小购买量
|
|
@@ -523,8 +524,8 @@ let getNewProductAsyncData = (data) => { |
|
@@ -523,8 +524,8 @@ let getNewProductAsyncData = (data) => { |
523
|
|
524
|
|
524
|
finalResult.discountBuy = {
|
525
|
finalResult.discountBuy = {
|
525
|
num: minBuyNum,
|
526
|
num: minBuyNum,
|
526
|
- promotionPhrase: _.get(bundleData, 'bundleInfo.promotionPhrase', ''),
|
|
|
527
|
- discount: _.get(bundleData, 'bundleInfo.discount', '')
|
527
|
+ promotionPhrase: discountBuy.bundleInfo.promotionPhrase,
|
|
|
528
|
+ discount: discountBuy.bundleInfo.discount
|
528
|
};
|
529
|
};
|
529
|
}
|
530
|
}
|
530
|
return finalResult;
|
531
|
return finalResult;
|