...
|
...
|
@@ -48,7 +48,7 @@ function getGenderByCookie(req) { |
|
|
return gender;
|
|
|
}
|
|
|
|
|
|
module.exports.show= (req, res, next) => {
|
|
|
module.exports.show = (req, res, next) => {
|
|
|
// TODO: 需要修改为正式取 UID 的方式
|
|
|
// TODO: vipLevel = 0; // 用户等级
|
|
|
|
...
|
...
|
@@ -69,7 +69,7 @@ module.exports.show= (req, res, next) => { |
|
|
ua: req.get('user-agent') || '',
|
|
|
channel: channel,
|
|
|
gender: gender,
|
|
|
uid: 0,
|
|
|
uid: '',
|
|
|
vipLevel: 0
|
|
|
}).then((result) => {
|
|
|
res.render('detail', Object.assign({
|
...
|
...
|
@@ -78,6 +78,7 @@ module.exports.show= (req, res, next) => { |
|
|
}, result));
|
|
|
}).catch(next);
|
|
|
};
|
|
|
/**/
|
|
|
|
|
|
/**
|
|
|
* 获得评论
|
...
|
...
|
@@ -94,3 +95,15 @@ module.exports.comments = (req, res, next) => { |
|
|
res.json(result)
|
|
|
}).catch(next);
|
|
|
}
|
|
|
|
|
|
module.exports.consults = (req, res, next) => {
|
|
|
// TODO: uid
|
|
|
let uid = '';
|
|
|
let pid = req.params.productId || 0;
|
|
|
let page = req.params.page || 1;
|
|
|
let size = req.params.size || 10;
|
|
|
|
|
|
detail.getConsultsAsync(uid, pid, page, size).then(result => {
|
|
|
res.json(result);
|
|
|
}).catch(next);
|
|
|
} |
...
|
...
|
|