Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
htoooth
8 years ago
Commit
fe616ff22ac7c03b74bd6f26d70425ffee4ca9a6
1 parent
8ee6f71a
add router
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
apps/home/router.js
apps/home/router.js
View file @
fe616ff
...
...
@@ -13,6 +13,7 @@ const msgModel = require('./models/message');
const
_
=
require
(
'lodash'
);
const
helpers
=
global
.
yoho
.
helpers
;
const
indexController
=
require
(
`
$
{
cRoot
}
/Index`
)
;
const
commentController
=
require
(
`
$
{
cRoot
}
/comment`
)
;
// const consultController = require(`${cRoot}/consult`);
...
...
@@ -20,7 +21,6 @@ const commentController = require(`${cRoot}/comment`);
const
messageController
=
require
(
`
$
{
cRoot
}
/message`
)
;
// const returnsController = require(`${cRoot}/returns`);
// const IndexController = require(`${cRoot}/Index`);
// const CurrencyController = require(`${cRoot}/Currency`);
const
personalController
=
require
(
`
$
{
cRoot
}
/qrcode`
)
;
...
...
@@ -182,6 +182,7 @@ const getHomeNav = (req, res, next) => {
next
();
});
};
const
getCommonHeader
=
(
req
,
res
,
next
)
=>
{
let
channel
=
req
.
query
.
channel
?
req
.
query
.
channel
:
'boys'
;
...
...
@@ -191,6 +192,9 @@ const getCommonHeader = (req, res, next) => {
});
};
// 首页
router
.
get
([
'/index'
,
'/'
],
[
getHomeNav
,
getCommonHeader
],
indexController
.
index
);
// 查看二维码
router
.
get
(
'/QRcode'
,
[
getHomeNav
,
getCommonHeader
],
personalController
.
QRcode
);
...
...
@@ -240,7 +244,7 @@ router.get('/message/pickCoupon', messageController.pickCoupon);
/********************************* 我的收藏开始 *****************************************/
// 我的收藏
router
.
get
(
'/favorite'
,
[
getCommonHeader
,
getHomeNav
],
favoriteController
.
index
);
router
.
get
(
'/favorite'
,
[
getCommonHeader
,
getHomeNav
],
favoriteController
.
index
);
// 品牌页新品到着
router
.
get
(
'/favorite/newproduct'
,
favoriteController
.
newProduct
);
...
...
Please
register
or
login
to post a comment