...
|
...
|
@@ -161,7 +161,7 @@ const _getVipDataByProductBaseInfo = (data, vipLevel, uid) => { |
|
|
level: value.vipLevel,
|
|
|
price: value.vipPrice,
|
|
|
name: value.vipTitle,
|
|
|
cur: value.vipLevel === vipLevel ? true : false
|
|
|
cur: value.vipLevel === vipLevel
|
|
|
});
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -169,14 +169,14 @@ const _getVipDataByProductBaseInfo = (data, vipLevel, uid) => { |
|
|
vipData.unLogin = false;
|
|
|
|
|
|
if (!uid) {
|
|
|
vipData.unLogin = helpers.urlFormat('signin.html');
|
|
|
vipData.unLogin = helpers.urlFormat('/signin.html');
|
|
|
}
|
|
|
|
|
|
if (!vipLevel && uid) {
|
|
|
vipData.normalUser = true;
|
|
|
}
|
|
|
|
|
|
vipData.vipSchedualUrl = helpers.urlFormat('home/vip', {
|
|
|
vipData.vipSchedualUrl = helpers.urlFormat('/home/vip', {
|
|
|
t: _.random(10000, 9999999)
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -286,7 +286,7 @@ const _getBrandDataByProductBaseInfo = (data) => { |
|
|
}
|
|
|
|
|
|
// banner的logo
|
|
|
if (bannerInfo.logo) {
|
|
|
if (bannerInfo && bannerInfo.logo) {
|
|
|
logo = helpers.getForceSourceUrl(bannerInfo.logo);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -1343,12 +1343,16 @@ const showMainAsync = data => { |
|
|
// 获取商品信息
|
|
|
let productInfo = yield productAPI.getProductAsync(data.pid, data.uid).then(currentUserProductInfo);
|
|
|
|
|
|
if (!productInfo || _.isEmpty(productInfo)) {
|
|
|
return Promise.reject({
|
|
|
code: 404
|
|
|
});
|
|
|
}
|
|
|
let requestData = yield Promise.all([
|
|
|
_getSortNavAsync(productInfo.goodsInfo.smallSortId, data.gender),
|
|
|
HeaderModel.requestHeaderData()
|
|
|
]);
|
|
|
|
|
|
|
|
|
// 分类导航
|
|
|
let navs = requestData[0];
|
|
|
const seo = _getSeoByGoodsInfo(productInfo.goodsInfo, navs);
|
...
|
...
|
@@ -1380,6 +1384,7 @@ const showMainAsync = data => { |
|
|
|
|
|
module.exports = {
|
|
|
indexCommentAsync: commentService.indexAsync, // 获取评论列表
|
|
|
getShareOrderListAsync: commentService.getShareOrderListAsync, // 获取评论列表
|
|
|
indexConsultAsync: consultService.indexAsync, // 获取咨询列表
|
|
|
createConsultAsync: consultService.createAsync, // 添加咨询
|
|
|
showMainAsync: showMainAsync, // 获取某一个商品详情主页面
|
...
|
...
|
|