...
|
...
|
@@ -159,7 +159,7 @@ const index = (req, res, next) => { |
|
|
|
|
|
co(function* () {
|
|
|
let detail = yield req.ctx(DetailModel).packageData(id, isApp, isWeixin, channel, isShare);
|
|
|
let commentsTotal = yield req.ctx(DetailModel).commentsTotal({article_id: id});
|
|
|
let commentsTotal = yield req.ctx(DetailModel).commentsTotal({article_id: id, udid: udid});
|
|
|
let praise = yield req.ctx(DetailModel).getArticlePraiseAndFavor({
|
|
|
uid: uid,
|
|
|
id: id,
|
...
|
...
|
@@ -316,7 +316,7 @@ const mini = (req, res, next) => { |
|
|
|
|
|
co(function* () {
|
|
|
let detail = yield req.ctx(DetailModel).packageData(id, isApp);
|
|
|
let commentsTotal = yield req.ctx(DetailModel).commentsTotal({article_id: id});
|
|
|
let commentsTotal = yield req.ctx(DetailModel).commentsTotal({article_id: id, udid: udid});
|
|
|
let praise = yield req.ctx(DetailModel).getArticlePraiseAndFavor({
|
|
|
uid: uid,
|
|
|
id: id,
|
...
|
...
|
@@ -454,10 +454,12 @@ const foryoho = (req, res, next) => { |
|
|
* @param {*} next
|
|
|
*/
|
|
|
const getComments = (req, res, next) => {
|
|
|
let udid = req.sessionID || require('yoho-md5')(req.ip) || 'yoho';
|
|
|
|
|
|
req.ctx(DetailModel).comments({
|
|
|
article_id: req.query.article_id,
|
|
|
page: req.query.page
|
|
|
page: req.query.page,
|
|
|
udid: udid
|
|
|
}).then(result => {
|
|
|
return res.render('info/comments', {
|
|
|
comments: result,
|
...
|
...
|
|