Authored by 周少峰

Merge branch 'feature/guangDev' into release/5.8

@@ -217,7 +217,7 @@ exports.detail = (req, res, next) => { @@ -217,7 +217,7 @@ exports.detail = (req, res, next) => {
217 } 217 }
218 218
219 if (pjax) { 219 if (pjax) {
220 - req.ctx(guangModel).getArticleComments(uid, id, page, pageSize).then(ret => { 220 + req.ctx(guangModel).getArticleComments(udid, uid, id, page, pageSize).then(ret => {
221 221
222 res.set('Cache-Control', 'no-cache'); 222 res.set('Cache-Control', 'no-cache');
223 res.render('guang/detail-comment', { 223 res.render('guang/detail-comment', {
@@ -250,7 +250,7 @@ exports.detail = (req, res, next) => { @@ -250,7 +250,7 @@ exports.detail = (req, res, next) => {
250 headerModel.requestHeaderData(channel), 250 headerModel.requestHeaderData(channel),
251 reqCtx.getArticleContent(id), 251 reqCtx.getArticleContent(id),
252 reqCtx.getHotTags(1, 20, channel, isHotDegrade), 252 reqCtx.getHotTags(1, 20, channel, isHotDegrade),
253 - reqCtx.getArticleComments(uid, id, page, pageSize), 253 + reqCtx.getArticleComments(udid, uid, id, page, pageSize),
254 reqCtx.getArticleBaseInfo(id, uid, udid), 254 reqCtx.getArticleBaseInfo(id, uid, udid),
255 reqCtx.getArticleRelateBrand(id), 255 reqCtx.getArticleRelateBrand(id),
256 reqCtx.getRecoArticles(gender, 1, 10, channel), 256 reqCtx.getRecoArticles(gender, 1, 10, channel),
@@ -392,7 +392,7 @@ exports.comment = (req, res) => { @@ -392,7 +392,7 @@ exports.comment = (req, res) => {
392 req.session['comment_' + udid] = null; 392 req.session['comment_' + udid] = null;
393 } 393 }
394 394
395 - return req.ctx(guangModel).getArticleComments(uid, id, 1, 20); 395 + return req.ctx(guangModel).getArticleComments(udid, uid, id, 1, 20);
396 }).then(commentInfo => { 396 }).then(commentInfo => {
397 397
398 res.render('guang/detail-comment', { 398 res.render('guang/detail-comment', {
@@ -990,13 +990,14 @@ module.exports = class extends global.yoho.BaseModel { @@ -990,13 +990,14 @@ module.exports = class extends global.yoho.BaseModel {
990 /** 990 /**
991 * 获取文章评论数据 991 * 获取文章评论数据
992 */ 992 */
993 - getArticleComments(uid, aid, page, pageSize) {  
994 - 993 + getArticleComments(udid, uid, aid, page, pageSize) {
  994 + udid = udid || 0;
995 uid = uid || 0; 995 uid = uid || 0;
996 page = page || 1; 996 page = page || 1;
997 pageSize = pageSize || 20; 997 pageSize = pageSize || 20;
998 998
999 let data = { 999 let data = {
  1000 + udid: udid,
1000 uid: uid, 1001 uid: uid,
1001 article_id: aid, 1002 article_id: aid,
1002 page: page, 1003 page: page,