Showing
1 changed file
with
7 additions
and
3 deletions
@@ -229,11 +229,10 @@ let getProductData = (data) => { | @@ -229,11 +229,10 @@ let getProductData = (data) => { | ||
229 | finalResult.enterStore = info[0]; | 229 | finalResult.enterStore = info[0]; |
230 | finalResult.isStudent = data.isStudent; | 230 | finalResult.isStudent = data.isStudent; |
231 | 231 | ||
232 | - /* TODO tar add 161125 套装 立省 80 不确定需不需要前端计算 */ | ||
233 | let bundleData = _.get(info[4], 'data', null); | 232 | let bundleData = _.get(info[4], 'data', null); |
234 | 233 | ||
235 | - | ||
236 | - if (bundleData) { | 234 | + /* 套装 */ |
235 | + if (bundleData && _.get(bundleData, 'bundleInfo.discountType', null) === 1) { | ||
237 | finalResult.bundleData = { | 236 | finalResult.bundleData = { |
238 | title: '优惠套装', | 237 | title: '优惠套装', |
239 | href: helpers.urlFormat('/product/bundle/detail', {skn: result.product_skn}), | 238 | href: helpers.urlFormat('/product/bundle/detail', {skn: result.product_skn}), |
@@ -245,6 +244,11 @@ let getProductData = (data) => { | @@ -245,6 +244,11 @@ let getProductData = (data) => { | ||
245 | }; | 244 | }; |
246 | } | 245 | } |
247 | 246 | ||
247 | + /* 量贩 */ | ||
248 | + if (bundleData && _.get(bundleData, 'bundleInfo.discountType', null) === 2) { | ||
249 | + finalResult.discount = _.get(bundleData, 'bundleInfo.bundleCount', 1); | ||
250 | + } | ||
251 | + | ||
248 | Object.assign(finalResult.feedbacks, info[1]); | 252 | Object.assign(finalResult.feedbacks, info[1]); |
249 | 253 | ||
250 | /* 如果有咨询,显示咨询,否则显示常见问题 */ | 254 | /* 如果有咨询,显示咨询,否则显示常见问题 */ |
-
Please register or login to post a comment