Authored by htoooth

first time remove sale price

... ... @@ -1474,24 +1474,10 @@ const getDetailHeader = (pid, uid, isStudent, vipLevel, dataMd5, cookie) => {
return productAPI.getProductAsync(pid, uid, isStudent, vipLevel)
.then(currentUserProductInfo)
.then((result) => {
if (_.isEmpty(result) || !_.get(result, 'goodsInfo.md5')) {
return {
code: 204, // 没有改变数据
data: {}
};
}
if (_.get(result, 'goodsInfo.md5') !== dataMd5 || uid) {
return {
code: 200, // 改变数据
data: result
};
} else {
return {
code: 204, // 没有改变数据
data: {}
};
}
return {
code: 200, // 改变数据
data: result
};
});
};
... ... @@ -1504,6 +1490,17 @@ const saleReturn = (skn) => {
};
/**
* 第一次把售价隐藏,防爬虫的需要
*/
const _removeSalePrice = (productInfo) => {
delete productInfo.goodsInfo.salePrice;
delete productInfo.goodsInfo.hasOtherPrice;
delete productInfo.goodsInfo.promotion;
return productInfo;
};
/**
* 获取某一个商品详情主页面
*/
const showMainAsync = (data) => {
... ... @@ -1541,7 +1538,7 @@ const showMainAsync = (data) => {
// 商品价格
result.productDetailPage = true;
result.detail = productInfo;
result.detail = _removeSalePrice(productInfo);
// 商品介绍
let intro = _getIntroInfo(productSkn, maxSortId, productDescription);
... ...