...
|
...
|
@@ -26,8 +26,6 @@ class DetailAction extends YohoAction { |
|
|
|
|
|
let pid = req.params[0];
|
|
|
let gid = req.params[1];
|
|
|
let uid = req.user.uid || '';
|
|
|
let vipLevel = detailHelper.vipLevel(req.user.vip);
|
|
|
let saveCurrentGoodsInCookies = _.partial(service.saveRecentGoodInCookies,
|
|
|
req.cookies._browse,
|
|
|
req.cookies._browseskn,
|
...
|
...
|
@@ -39,9 +37,9 @@ class DetailAction extends YohoAction { |
|
|
gid: gid,
|
|
|
channel: this.getSessionChannel(),
|
|
|
gender: this.guessUserGender(),
|
|
|
uid: uid,
|
|
|
isStudent: req.user.isStudent,
|
|
|
vipLevel: vipLevel,
|
|
|
uid: null,
|
|
|
isStudent: null,
|
|
|
vipLevel: null,
|
|
|
saveInCookies: saveCurrentGoodsInCookies
|
|
|
}).then(result=> {
|
|
|
const seo = result.seo;
|
...
|
...
|
@@ -172,13 +170,13 @@ class CreateConsultAction extends YohoAction { |
|
|
|
|
|
const detailHeader = (req, res, next) => {
|
|
|
let pid = req.query.productId || 0;
|
|
|
let uid = req.user.uid || '';
|
|
|
let uid = req.user.uid || 0;
|
|
|
let vipLevel = detailHelper.vipLevel(req.user.vip);
|
|
|
let dataMd5 = req.query.md5 || 0;
|
|
|
|
|
|
service.getDetailHeader(pid, uid, req.user.isStudent, vipLevel, dataMd5).then((result) => {
|
|
|
if (result.code === 200) {
|
|
|
return res.render('product/detail-header', Object.assign({layout: false}, result));
|
|
|
return res.render('product/detail-header', Object.assign({layout: false}, result.data));
|
|
|
} else {
|
|
|
return res.status(204).end();
|
|
|
}
|
...
|
...
|
|