...
|
...
|
@@ -58,34 +58,13 @@ module.exports = () => { |
|
|
req.url = `/product/search${req.path}`;
|
|
|
}
|
|
|
|
|
|
if (/^\/shop/.test(req.url)) {
|
|
|
// SEO 店铺路由重写 新路由
|
|
|
if (/^\/(list|shop)/.test(req.url)) {
|
|
|
// 商品列表页、全球购商品列表页、店铺首页路由
|
|
|
req.url = `/product${req.url}`;
|
|
|
}
|
|
|
|
|
|
if (/^\/list\/global/.test(req.url)) {
|
|
|
// 全球购商品列表路由重写
|
|
|
req.url = `/product${req.url}`;
|
|
|
}
|
|
|
|
|
|
if (/^\/list/.test(req.url)) {
|
|
|
// 列表页路由重写 跳转到新的列表路由,进行参数的前置处理
|
|
|
req.url = `/product${req.url}`;
|
|
|
}
|
|
|
|
|
|
if (/^\/boys-/.test(req.url)) {
|
|
|
req.url = `/product${req.url}`;
|
|
|
}
|
|
|
|
|
|
if (/^\/girls-/.test(req.url)) {
|
|
|
req.url = `/product${req.url}`;
|
|
|
}
|
|
|
|
|
|
if (/^\/kids-/.test(req.url)) {
|
|
|
req.url = `/product${req.url}`;
|
|
|
}
|
|
|
|
|
|
if (/^\/lifestyle-/.test(req.url)) {
|
|
|
if (/^\/(boys|girls|kids|lifestyle)-/.test(req.url)) {
|
|
|
// 匹配新品到着,sale 带频道的路由
|
|
|
req.url = `/product${req.url}`;
|
|
|
}
|
|
|
|
...
|
...
|
|