...
|
...
|
@@ -7,7 +7,6 @@ |
|
|
|
|
|
module.exports = () => {
|
|
|
return (req, res, next) => {
|
|
|
|
|
|
let searchReg = /^\/product\//;
|
|
|
|
|
|
if (req.subdomains.length) {
|
...
|
...
|
@@ -28,7 +27,11 @@ module.exports = () => { |
|
|
}
|
|
|
break;
|
|
|
case 'list': // 商品列表
|
|
|
req.url = req.path === '/new' ? '/product/list/new' : '/product/list/index';
|
|
|
if (!req.path || req.path === '/') {
|
|
|
req.url = '/product/list/index';
|
|
|
} else if (req.path === '/new') {
|
|
|
req.url = '/product/list/new';
|
|
|
}
|
|
|
break;
|
|
|
case 'sale': // 促销
|
|
|
if (!req.path || req.path === '/') {
|
...
|
...
|
|