Authored by 陈峰

重命名逛列表页page控制器为pageData避免和自变量重名导致eslint错误提示

... ... @@ -70,7 +70,7 @@ const editor = (req, res, next) => {
* @param {Function} next [description]
* @return {[type]} [description]
*/
const page = (req, res, next) => {
const pageData = (req, res, next) => {
/* 判断是不是AJAX请求 */
if (!req.xhr) {
res.json({ code: 400, message: '非法请求', data: '' });
... ... @@ -146,6 +146,6 @@ const index = (req, res, next) => {
module.exports = {
editor,
page,
pageData,
index
};
... ...
... ... @@ -395,6 +395,9 @@ const mini = (req, res, next) => {
}).catch(next);
};
/**
* [提供给YOHO资讯站调用的接口]
*/
const foryoho = (req, res, next) => {
let id = req.query.id,
gender = req.query.gender || req.cookies._Channel && channels[req.cookies._Channel] || 1,
... ...
... ... @@ -33,7 +33,7 @@ router.get('/', index.index); // 逛首页
router.get('/author/list', index.editor); // 编辑简介
router.get('/index/page', index.page); // 逛列表页面的资讯分页
router.get('/index/page', index.pageData); // 逛列表页面的资讯分页
router.post('/opt/praiseArticle', opt.praiseArticle); // 资讯文章点赞 (H5里显示点赞)
... ...