Authored by htoooth

fix bundle

@@ -206,10 +206,10 @@ const _getProductActivityBanner = (additionalData) => { @@ -206,10 +206,10 @@ const _getProductActivityBanner = (additionalData) => {
206 206
207 const _getBundleAsync = (result) => { 207 const _getBundleAsync = (result) => {
208 return { 208 return {
209 - count: _.get(result, 'data.bundleInfo.bundleCount', 1),  
210 - phrase: _.get(result, 'data.bundleInfo.promotionPhrase', ''),  
211 - type: _.get(result, 'data.bundleInfo.discountType', 1),  
212 - discount: _.get(result, 'data.bundleInfo.discount', null) 209 + count: _.get(result, 'data[0].bundleInfo.bundleCount', 1),
  210 + phrase: _.get(result, 'data[0].bundleInfo.promotionPhrase', ''),
  211 + type: _.get(result, 'data[0].bundleInfo.discountType', 1),
  212 + discount: _.get(result, 'data[0].bundleInfo.discount', null)
213 }; 213 };
214 }; 214 };
215 215
@@ -220,7 +220,9 @@ const _getActivityDataByProductBaseInfo = (data) => { @@ -220,7 +220,9 @@ const _getActivityDataByProductBaseInfo = (data) => {
220 return { 220 return {
221 type: value.promotionType.replace(/¥/g, '¥'), 221 type: value.promotionType.replace(/¥/g, '¥'),
222 des: des, 222 des: des,
223 - url: value.id && helpers.urlFormat('', {psp_id: value.id, phrase: encodeURIComponent('以下商品参加 ' + des)}, 'list') 223 + url: value.id && helpers.urlFormat('',
  224 + {psp_id: value.id, phrase: encodeURIComponent('以下商品参加 ' + des)}, 'list'
  225 + )
224 }; 226 };
225 }); 227 });
226 }; 228 };
@@ -1319,7 +1321,7 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => { @@ -1319,7 +1321,7 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => {
1319 } 1321 }
1320 1322
1321 // 量贩商品 1323 // 量贩商品
1322 - if (bundle && !_.isEmpty(_.get(bundle, 'data', {}))) { 1324 + if (bundle && !_.isEmpty(_.get(bundle, 'data', []))) {
1323 result.bundle = _getBundleAsync(bundle); 1325 result.bundle = _getBundleAsync(bundle);
1324 1326
1325 result.activity.unshift({ 1327 result.activity.unshift({
@@ -11,7 +11,7 @@ const isTest = process.env.NODE_ENV === 'test'; @@ -11,7 +11,7 @@ const isTest = process.env.NODE_ENV === 'test';
11 11
12 module.exports = { 12 module.exports = {
13 app: 'web', 13 app: 'web',
14 - appVersion: '5.3.0', // 调用api的版本 14 + appVersion: '5.5.0', // 调用api的版本
15 port: 6002, 15 port: 6002,
16 siteUrl: 'http://www.yohobuy.com', 16 siteUrl: 'http://www.yohobuy.com',
17 cookieDomain: '.yohobuy.com', 17 cookieDomain: '.yohobuy.com',