Authored by 周少峰

Merge branch 'feature/seoUrl'

@@ -296,7 +296,7 @@ const getPackage = (req, res, next) => { @@ -296,7 +296,7 @@ const getPackage = (req, res, next) => {
296 }; 296 };
297 297
298 const redirectNewRouter = (req, res) => { 298 const redirectNewRouter = (req, res) => {
299 - return res.redirect(301, helpers.urlFormat(`/p${req.params[0]}.html${req.params[2]}`, null, 'item')); 299 + return res.redirect(301, helpers.urlFormat(`/p${req.params[0]}.html${req.params[3]}`, null, 'item'));
300 }; 300 };
301 301
302 module.exports = { 302 module.exports = {
@@ -62,7 +62,7 @@ router.get('/outlets/:channel', outlets.channel); // 奥莱频道页 @@ -62,7 +62,7 @@ router.get('/outlets/:channel', outlets.channel); // 奥莱频道页
62 62
63 // 商品分类列表页 63 // 商品分类列表页
64 router.get('/list', outletsList.index); 64 router.get('/list', outletsList.index);
65 -router.get(/\/pro_([\d]+)_([\d]+)\/(.*)/, detail.redirectNewRouter); // 老的商品详情routers 65 +router.get(/\/pro_([\d]+)_([\d]+)\/(.*).html(.*)/, detail.redirectNewRouter); // 老的商品详情routers
66 router.get(/\/p([\d]+)(.*)/, detail.showMain); // 新的商品详情routers 66 router.get(/\/p([\d]+)(.*)/, detail.showMain); // 新的商品详情routers
67 router.get('/detail/comment', detail.indexComment); // 商品评论 67 router.get('/detail/comment', detail.indexComment); // 商品评论
68 router.get('/detail/consult', detail.indexConsult); // 商品咨询 68 router.get('/detail/consult', detail.indexConsult); // 商品咨询