Authored by yyq

message router

  1 +/**
  2 + * 我的消息controller
  3 + * @author: yyq<yanqing.yang@yoho.cn>
  4 + * @date: 2016/8/29
  5 + */
  6 +'use strict';
  7 +
  8 +const index = (req, res, next) => {
  9 + let uid = req.user.uid;
  10 + // let page = req.query.page || 1;
  11 + if (!uid) {
  12 + return next();
  13 + }
  14 + res.send('success');
  15 +};
  16 +
  17 +module.exports = {
  18 + index
  19 +};
@@ -17,6 +17,7 @@ const helpers = global.yoho.helpers; @@ -17,6 +17,7 @@ const helpers = global.yoho.helpers;
17 const commentController = require(`${cRoot}/comment`); 17 const commentController = require(`${cRoot}/comment`);
18 const consultController = require(`${cRoot}/consult`); 18 const consultController = require(`${cRoot}/consult`);
19 const complaintsController = require(`${cRoot}/complaints`); 19 const complaintsController = require(`${cRoot}/complaints`);
  20 +const messageController = require(`${cRoot}/message`);
20 const returnsController = require(`${cRoot}/returns`); 21 const returnsController = require(`${cRoot}/returns`);
21 const IndexController = require(`${cRoot}/Index`); 22 const IndexController = require(`${cRoot}/Index`);
22 const CurrencyController = require(`${cRoot}/Currency`); 23 const CurrencyController = require(`${cRoot}/Currency`);
@@ -134,6 +135,9 @@ router.get('/complaints', [getCommonHeader, getHomeNav], complaintsController.in @@ -134,6 +135,9 @@ router.get('/complaints', [getCommonHeader, getHomeNav], complaintsController.in
134 router.post('/complaints/submit', complaintsController.submit); 135 router.post('/complaints/submit', complaintsController.submit);
135 router.post('/complaints/cancel', complaintsController.cancel); 136 router.post('/complaints/cancel', complaintsController.cancel);
136 137
  138 +// 我的消息
  139 +router.get('/message', messageController.index);
  140 +
137 // 我的退/换货 141 // 我的退/换货
138 router.get('/returns', returnsController.index); 142 router.get('/returns', returnsController.index);
139 143