Authored by htoooth

add user

... ... @@ -31,15 +31,18 @@ class DetailAction extends YohoAction {
req.cookies._browseskn,
this.response
);
let vipLevel = detailHelper.vipLevel(req.user.vip);
let uid = req.user.uid || 0;
let isStudent = req.user.isStudent || 0;
return service.showMainAsync({
pid: pid,
gid: gid,
channel: this.getSessionChannel(),
gender: this.guessUserGender(),
uid: null,
isStudent: null,
vipLevel: null,
uid: uid,
isStudent: isStudent,
vipLevel: vipLevel,
saveInCookies: saveCurrentGoodsInCookies
}).then(result=> {
const seo = result.seo;
... ...
... ... @@ -1259,8 +1259,9 @@ const _detailDataPkg = (origin, uid, vipLevel) => {
}
}
statGoodsInfo.imageUrl = result.img;
statGoodsInfo.productUrl = helpers.urlFormat(url.parse(propOrigin('product_url')).pathname, null, 'item');
statGoodsInfo.imageUrl = 'http:' + result.img.split('?')[0];
statGoodsInfo.productUrl = 'http:' +
helpers.urlFormat(url.parse(propOrigin('product_url')).pathname, null, 'item');
statGoodsInfo.smallSortId = result.smallSortId;
statGoodsInfo.soldOut = soldOut ? 1 : 0;
... ...