Authored by zzzzzzz

再次简化

... ... @@ -584,9 +584,7 @@ const _detailDataPkg = (origin, uid, vipLevel, ua) => {
}
// 商品促销短语
if (origin.salesPhrase) {
dest.goodsSubtitle = origin.salesPhrase;
}
origin.salesPhrase && (dest.goodsSubtitle = origin.salesPhrase);
// 促销信息 TODO: 换新接口
if (origin.promotionBoList) {
... ... @@ -598,11 +596,9 @@ const _detailDataPkg = (origin, uid, vipLevel, ua) => {
});
});
if (discountList.length) {
dest.goodsDiscount = {
list: discountList
};
}
discountList.length && (dest.goodsDiscount = {
list: discountList
});
}
// 商品标签
... ... @@ -628,9 +624,7 @@ const _detailDataPkg = (origin, uid, vipLevel, ua) => {
dest.goodsPrice = goodsPrice;
// 商品返回 YOHO 币
if (origin.yohoCoinNum) {
dest.commodityReturn = origin.yohoCoinNum;
}
origin.yohoCoinNum && (dest.commodityReturn = origin.yohoCoinNum);
// VIP 商品价格
if (origin.vip) {
... ... @@ -649,18 +643,14 @@ const _detailDataPkg = (origin, uid, vipLevel, ua) => {
});
});
if (vipList.length) {
dest.vipLevel = {
list: vipList
};
}
vipList.length && (dest.vipLevel = {
list: vipList
});
}
// 上市期
if (origin.expectArrivalTime) {
dest.periodOfMarket = `${origin.expectArrivalTime}月`;
}
origin.expectArrivalTime && (dest.periodOfMarket = `${origin.expectArrivalTime}月`);
// 商品咨询
dest.feedbacks = {
... ... @@ -743,8 +733,8 @@ const _detailDataPkg = (origin, uid, vipLevel, ua) => {
storage: size.storageNumber
};
allSizeList[sizeName] = (allSizeList[sizeName] === null ||
typeof allSizeList[sizeName] === 'undefined') ? build : allSizeList[sizeName];
allSizeList[sizeName] = (allSizeList[sizeName] === null ||
typeof allSizeList[sizeName] === 'undefined') ? build : allSizeList[sizeName];
colorStorageNum += parseInt(size.storageNumber, 10);
colorStorageGroup[value.productSkc][sizeName] = parseInt(size.storageNumber, 10);
});
... ...