Showing
1 changed file
with
6 additions
and
2 deletions
@@ -13,6 +13,7 @@ const msgModel = require('./models/message'); | @@ -13,6 +13,7 @@ const msgModel = require('./models/message'); | ||
13 | const _ = require('lodash'); | 13 | const _ = require('lodash'); |
14 | const helpers = global.yoho.helpers; | 14 | const helpers = global.yoho.helpers; |
15 | 15 | ||
16 | +const indexController = require(`${cRoot}/Index`); | ||
16 | const commentController = require(`${cRoot}/comment`); | 17 | const commentController = require(`${cRoot}/comment`); |
17 | 18 | ||
18 | // const consultController = require(`${cRoot}/consult`); | 19 | // const consultController = require(`${cRoot}/consult`); |
@@ -20,7 +21,6 @@ const commentController = require(`${cRoot}/comment`); | @@ -20,7 +21,6 @@ const commentController = require(`${cRoot}/comment`); | ||
20 | const messageController = require(`${cRoot}/message`); | 21 | const messageController = require(`${cRoot}/message`); |
21 | 22 | ||
22 | // const returnsController = require(`${cRoot}/returns`); | 23 | // const returnsController = require(`${cRoot}/returns`); |
23 | -// const IndexController = require(`${cRoot}/Index`); | ||
24 | // const CurrencyController = require(`${cRoot}/Currency`); | 24 | // const CurrencyController = require(`${cRoot}/Currency`); |
25 | const personalController = require(`${cRoot}/qrcode`); | 25 | const personalController = require(`${cRoot}/qrcode`); |
26 | 26 | ||
@@ -182,6 +182,7 @@ const getHomeNav = (req, res, next) => { | @@ -182,6 +182,7 @@ const getHomeNav = (req, res, next) => { | ||
182 | next(); | 182 | next(); |
183 | }); | 183 | }); |
184 | }; | 184 | }; |
185 | + | ||
185 | const getCommonHeader = (req, res, next) => { | 186 | const getCommonHeader = (req, res, next) => { |
186 | let channel = req.query.channel ? req.query.channel : 'boys'; | 187 | let channel = req.query.channel ? req.query.channel : 'boys'; |
187 | 188 | ||
@@ -191,6 +192,9 @@ const getCommonHeader = (req, res, next) => { | @@ -191,6 +192,9 @@ const getCommonHeader = (req, res, next) => { | ||
191 | }); | 192 | }); |
192 | }; | 193 | }; |
193 | 194 | ||
195 | +// 首页 | ||
196 | +router.get(['/index', '/'], [getHomeNav, getCommonHeader], indexController.index); | ||
197 | + | ||
194 | // 查看二维码 | 198 | // 查看二维码 |
195 | router.get('/QRcode', [getHomeNav, getCommonHeader], personalController.QRcode); | 199 | router.get('/QRcode', [getHomeNav, getCommonHeader], personalController.QRcode); |
196 | 200 | ||
@@ -240,7 +244,7 @@ router.get('/message/pickCoupon', messageController.pickCoupon); | @@ -240,7 +244,7 @@ router.get('/message/pickCoupon', messageController.pickCoupon); | ||
240 | 244 | ||
241 | /********************************* 我的收藏开始 *****************************************/ | 245 | /********************************* 我的收藏开始 *****************************************/ |
242 | // 我的收藏 | 246 | // 我的收藏 |
243 | -router.get('/favorite', [getCommonHeader, getHomeNav], favoriteController.index ); | 247 | +router.get('/favorite', [getCommonHeader, getHomeNav], favoriteController.index); |
244 | 248 | ||
245 | // 品牌页新品到着 | 249 | // 品牌页新品到着 |
246 | router.get('/favorite/newproduct', favoriteController.newProduct); | 250 | router.get('/favorite/newproduct', favoriteController.newProduct); |
-
Please register or login to post a comment