Authored by 周少峰

Merge branch 'feature/guangDev' into release/5.8

... ... @@ -217,7 +217,7 @@ exports.detail = (req, res, next) => {
}
if (pjax) {
req.ctx(guangModel).getArticleComments(uid, id, page, pageSize).then(ret => {
req.ctx(guangModel).getArticleComments(udid, uid, id, page, pageSize).then(ret => {
res.set('Cache-Control', 'no-cache');
res.render('guang/detail-comment', {
... ... @@ -250,7 +250,7 @@ exports.detail = (req, res, next) => {
headerModel.requestHeaderData(channel),
reqCtx.getArticleContent(id),
reqCtx.getHotTags(1, 20, channel, isHotDegrade),
reqCtx.getArticleComments(uid, id, page, pageSize),
reqCtx.getArticleComments(udid, uid, id, page, pageSize),
reqCtx.getArticleBaseInfo(id, uid, udid),
reqCtx.getArticleRelateBrand(id),
reqCtx.getRecoArticles(gender, 1, 10, channel),
... ... @@ -392,7 +392,7 @@ exports.comment = (req, res) => {
req.session['comment_' + udid] = null;
}
return req.ctx(guangModel).getArticleComments(uid, id, 1, 20);
return req.ctx(guangModel).getArticleComments(udid, uid, id, 1, 20);
}).then(commentInfo => {
res.render('guang/detail-comment', {
... ...
... ... @@ -990,13 +990,14 @@ module.exports = class extends global.yoho.BaseModel {
/**
* 获取文章评论数据
*/
getArticleComments(uid, aid, page, pageSize) {
getArticleComments(udid, uid, aid, page, pageSize) {
udid = udid || 0;
uid = uid || 0;
page = page || 1;
pageSize = pageSize || 20;
let data = {
udid: udid,
uid: uid,
article_id: aid,
page: page,
... ...