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
yyq
8 years ago
Commit
7736724458015db5d7033a2aadd8c75e768b01ec
1 parent
1798f2dd
列表参数过滤
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
apps/product/router.js
apps/product/router.js
View file @
7736724
...
...
@@ -9,6 +9,7 @@
const
router
=
require
(
'express'
).
Router
();
// eslint-disable-line
const
cRoot
=
'./controllers'
;
const
auth
=
require
(
`
$
{
global
.
middleware
}
/auth`
)
;
const
filter
=
require
(
`
$
{
global
.
middleware
}
/filter-qs`
)
; /
/
参数过滤
// 商品详情controller
const
detail
=
require
(
`
$
{
cRoot
}
/detail`
)
;
...
...
@@ -79,16 +80,16 @@ router.post('/detail/notify/add', auth, notify.add); // 增
router
.
post
(
'/detail/notify/cancel'
,
auth
,
notify
.
cancel
);
// 删除到货通知
// 搜索
router
.
get
(
'/search/index'
,
search
.
index
);
router
.
get
(
'/search/index'
,
filter
,
search
.
index
);
router
.
get
(
'/search/filter/brands'
,
search
.
serachFilterBrands
);
router
.
get
(
'/search/suggest'
,
search
.
suggest
);
// 搜索提示
router
.
get
(
'/api/suggest'
,
search
.
suggest4Old
);
// 商品分类列表页
router
.
get
(
'/list/index'
,
list
.
index
);
router
.
get
(
'/list/index'
,
filter
,
list
.
index
);
// 新品到着
router
.
get
(
'/list/new'
,
list
.
new
);
router
.
get
(
'/list/new'
,
filter
,
list
.
new
);
// 品牌店铺
router
.
get
(
'/index/brand'
,
list
.
brand
);
// 品牌店铺页
...
...
Please
register
or
login
to post a comment