Authored by htoooth

fix bundle

... ... @@ -206,10 +206,10 @@ const _getProductActivityBanner = (additionalData) => {
const _getBundleAsync = (result) => {
return {
count: _.get(result, 'data.bundleInfo.bundleCount', 1),
phrase: _.get(result, 'data.bundleInfo.promotionPhrase', ''),
type: _.get(result, 'data.bundleInfo.discountType', 1),
discount: _.get(result, 'data.bundleInfo.discount', null)
count: _.get(result, 'data[0].bundleInfo.bundleCount', 1),
phrase: _.get(result, 'data[0].bundleInfo.promotionPhrase', ''),
type: _.get(result, 'data[0].bundleInfo.discountType', 1),
discount: _.get(result, 'data[0].bundleInfo.discount', null)
};
};
... ... @@ -220,7 +220,9 @@ const _getActivityDataByProductBaseInfo = (data) => {
return {
type: value.promotionType.replace(/¥/g, '¥'),
des: des,
url: value.id && helpers.urlFormat('', {psp_id: value.id, phrase: encodeURIComponent('以下商品参加 ' + des)}, 'list')
url: value.id && helpers.urlFormat('',
{psp_id: value.id, phrase: encodeURIComponent('以下商品参加 ' + des)}, 'list'
)
};
});
};
... ... @@ -1319,7 +1321,7 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => {
}
// 量贩商品
if (bundle && !_.isEmpty(_.get(bundle, 'data', {}))) {
if (bundle && !_.isEmpty(_.get(bundle, 'data', []))) {
result.bundle = _getBundleAsync(bundle);
result.activity.unshift({
... ...
... ... @@ -11,7 +11,7 @@ const isTest = process.env.NODE_ENV === 'test';
module.exports = {
app: 'web',
appVersion: '5.3.0', // 调用api的版本
appVersion: '5.5.0', // 调用api的版本
port: 6002,
siteUrl: 'http://www.yohobuy.com',
cookieDomain: '.yohobuy.com',
... ...