Authored by 郭成尧

'找寻丢失代码'

... ... @@ -168,6 +168,23 @@ const _detailDataPkg = (origin, uid, vipLevel, ua) => {
dest.goodsSubtitle = origin.salesPhrase;
}
// 促销信息 TODO: 换新接口
if (origin.promotionBoList) {
let discountList = [];
_.forEach(origin.promotionBoList, function(value) {
discountList.push({
text: `【${value.promotionType}${value.promotionTitle}`
});
});
if (discountList.length) {
dest.goodsDiscount = {
list: discountList
};
}
}
// 商品标签
if (origin.productTagBoList) {
let productTags = {};
... ... @@ -506,6 +523,7 @@ const _detailDataPkg = (origin, uid, vipLevel, ua) => {
dest.isCollect = false;
if (origin.isCollect !== null && typeof origin.isCollect !== 'undefined' && origin.isCollect === 'Y') {
dest.isCollect = true;
dest.cartInfo.isCollect = true;
}
// 底部简介URL链接
... ... @@ -608,7 +626,7 @@ let getProductData = (data) => {
});
}
if (!_.isEmpty(data.uid)) {
if (data.uid) {
params.uid = data.uid;
}
... ... @@ -616,7 +634,7 @@ let getProductData = (data) => {
data.vipLevel = (user.data && user.data.vip_info && user.data.vip_info.cur_level) || '0';
return api.get('', params, {
cache: true
cache: false
}).then(result => {
if (result.code === 500) {
return {};
... ...

6.28 KB | W: | H:

4.79 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

2.5 KB | W: | H:

23.4 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin