Authored by 陈峰

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

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