...
|
...
|
@@ -166,11 +166,17 @@ const _getVipDataByProductBaseInfo = (data, vipLevel, uid) => { |
|
|
vipData.normalUser = isNormalUser();
|
|
|
|
|
|
if (isVipUser()) {
|
|
|
vipData.prices = data.vip.map(value => ({
|
|
|
price: value.price,
|
|
|
name: value.caption,
|
|
|
cur: detailHelper.vipLevel(value.caption + '会员') === vipLevel
|
|
|
}));
|
|
|
vipData.prices = {};
|
|
|
_.some(data.vip, (vip) => {
|
|
|
if (detailHelper.vipLevel(vip.caption + '会员') === vipLevel) {
|
|
|
vipData.prices = {
|
|
|
price: vip.price,
|
|
|
name: vip.caption,
|
|
|
vipLevel: vipLevel
|
|
|
};
|
|
|
return true;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
vipData.vipSchedualUrl = helpers.urlFormat('/home/vip', {
|
...
|
...
|
@@ -194,13 +200,8 @@ const _getProductActivityBanner = (additionalData) => { |
|
|
};
|
|
|
};
|
|
|
|
|
|
const _getActivityDataByProductBaseInfo = (data, additionalData) => {
|
|
|
const _getActivityDataByProductBaseInfo = (data) => {
|
|
|
let result = [];
|
|
|
let activityBanner = _getProductActivityBanner(additionalData);
|
|
|
|
|
|
if (!_.isEmpty(activityBanner)) {
|
|
|
result.push(activityBanner);
|
|
|
}
|
|
|
|
|
|
_.get(data, 'data', []).forEach(value => {
|
|
|
result.push({
|
...
|
...
|
@@ -291,6 +292,8 @@ const _getSkuDataByProductBaseInfo = (data) => { |
|
|
return acc;
|
|
|
}
|
|
|
|
|
|
console.log(cur);
|
|
|
|
|
|
if (cur.images_list) {
|
|
|
// 商品列表
|
|
|
goodsGroup.productSkc = cur.product_skc;
|
...
|
...
|
@@ -1174,7 +1177,7 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => { |
|
|
|
|
|
// 促销活动banner,虚拟商品无促销
|
|
|
if (propOrigin('attribute') !== 3) {
|
|
|
result.activity = _getActivityDataByProductBaseInfo(promotionData, additionalData);
|
|
|
result.activity = _getActivityDataByProductBaseInfo(promotionData);
|
|
|
}
|
|
|
|
|
|
// 优惠券
|
...
|
...
|
|