Authored by 刘传洋

guang detail

... ... @@ -319,17 +319,6 @@ exports.detailDynamicData = (req, res) => {
});
};
exports.detailCommentData = (req, res) => {
let id = req.query.id,
page = req.query.page,
pageSize = req.query.pageSize || 20;
return guangModel.getArticleComments(id, page, pageSize).then(ret => {
return res.status(200).send(ret);
});
};
/**
* 添加评论
*/
... ...
... ... @@ -8,8 +8,6 @@
const _ = require('lodash');
const moment = require('moment');
const ghelper = require('./guang-helper');
const querystring = require('querystring');
const helpers = global.yoho.helpers;
const serviceApi = global.yoho.ServiceAPI;
... ... @@ -759,7 +757,10 @@ const getArticleComments = (aid, page, pageSize) => {
pageSize: pageSize,
page: page,
list: list,
baseUrl: `?${querystring.stringify({pageSize: pageSize})}`
baseUrl: helpers.urlFormat('/info/index', {
id: aid,
pageSize: pageSize
}, 'guang')
};
});
};
... ...
... ... @@ -25,6 +25,7 @@ router.get('/info/cancelCollect', guangController.cancelCollect);
router.get('/info/listData', guangController.listDynamicData);
router.get('/info/detailData', guangController.detailDynamicData);
router.get('/info/commentData', guangController.detailCommentData);
// router.get('/info/commentData', guangController.detailCommentData);
module.exports = router;
... ...