...
|
...
|
@@ -8,6 +8,7 @@ |
|
|
|
|
|
const router = require('express').Router(); // eslint-disable-line
|
|
|
const cRoot = './controllers';
|
|
|
const auth = require(`${global.middleware}/auth`);
|
|
|
|
|
|
// 商品详情controller
|
|
|
const detail = require(`${cRoot}/detail`);
|
...
|
...
|
@@ -45,7 +46,7 @@ router.get('/list', list.index); // 商品列表页 |
|
|
router.get(/\/pro_([\d]+)_([\d]+)\/(.*)/, detail.showMain); // 商品详情routers
|
|
|
router.get('/detail/comment', detail.indexComment);// 商品评论
|
|
|
router.get('/detail/consult', detail.indexConsult);// 商品咨询
|
|
|
router.post('/detail/consult', detail.createConsult);// 创建咨询
|
|
|
router.post('/detail/consult', auth, detail.createConsult);// 创建咨询
|
|
|
router.get('/detail/hotarea', detail.indexHotArea);// 商品热区
|
|
|
router.post('/index/favoriteBrand', favorite.changeFavoriteBrand);// 收藏品牌
|
|
|
router.post('/item/togglecollect', favorite.collectProduct); // 收藏商品
|
...
|
...
|
|