...
|
...
|
@@ -12,14 +12,32 @@ const _ = require('lodash'); |
|
|
|
|
|
// comment page
|
|
|
exports.index = (req, res, next) => {
|
|
|
let uid = req.user.uid;
|
|
|
/*let uid = req.user.uid;
|
|
|
let isComment = req.query.isComment;
|
|
|
let page = req.query.page || 1;
|
|
|
|
|
|
// 转string值为bool值
|
|
|
isComment = isComment === 'Y';
|
|
|
isComment = isComment === 'Y';*/
|
|
|
|
|
|
res.render('comment', {
|
|
|
comment: {
|
|
|
orders: [{
|
|
|
orderTime: '2016-10-10',
|
|
|
goods: [{
|
|
|
href: '',
|
|
|
thumb: 'http://img10.static.yhbimg.com/goodsimg/2015/08/05/06/016aeb5985c7e186b5c4e43e165311126d.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/70',
|
|
|
name: '阿斯顿发到付',
|
|
|
comments: [{
|
|
|
img: 'http://img10.static.yhbimg.com/goodsimg/2015/08/05/06/016aeb5985c7e186b5c4e43e165311126d.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/70'
|
|
|
}, {
|
|
|
img: 'http://img10.static.yhbimg.com/goodsimg/2015/08/05/06/016aeb5985c7e186b5c4e43e165311126d.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/70'
|
|
|
}]
|
|
|
}]
|
|
|
}]
|
|
|
}
|
|
|
});
|
|
|
|
|
|
commentModel.getCommentList(uid, isComment, page /* , limit=10*/)
|
|
|
/*commentModel.getCommentList(uid, isComment, page /!* , limit=10*!/)
|
|
|
.then(data => {
|
|
|
let localData = _.merge(data, {
|
|
|
module: 'home',
|
...
|
...
|
@@ -32,7 +50,7 @@ exports.index = (req, res, next) => { |
|
|
//
|
|
|
// });
|
|
|
})
|
|
|
.catch(next);
|
|
|
.catch(next);*/
|
|
|
};
|
|
|
|
|
|
exports.commentList4Order = (req, res, next) => {
|
...
|
...
|
|