Showing
1 changed file
with
11 additions
and
8 deletions
@@ -104,16 +104,19 @@ router.post('/detail/consultuseful', detail.consultUpvoteOrUseful); // 商品咨 | @@ -104,16 +104,19 @@ router.post('/detail/consultuseful', detail.consultUpvoteOrUseful); // 商品咨 | ||
104 | 104 | ||
105 | router.get('/sale', rewrite.channel, sale.indexRedirect); | 105 | router.get('/sale', rewrite.channel, sale.indexRedirect); |
106 | 106 | ||
107 | -router.get(/^\/(.*?)-sale\/discount\/detail/, | 107 | +router.get('/:channel-sale/discount/detail(/:pathParams)?', |
108 | rewrite.resolve, | 108 | rewrite.resolve, |
109 | rewrite.resolvePathParams, | 109 | rewrite.resolvePathParams, |
110 | sale.discountDetail); | 110 | sale.discountDetail); |
111 | -router.get(/^\/(.*?)-sale\/breakingYards/, | 111 | +router.get('/:channel-sale/breakingYards(/:pathParams)?', |
112 | rewrite.resolve, | 112 | rewrite.resolve, |
113 | rewrite.resolvePathParams, | 113 | rewrite.resolvePathParams, |
114 | sale.breakingYards); | 114 | sale.breakingYards); |
115 | -router.get(/^\/(.*?)-sale\/vip/, rewrite.resolve, sale.vip); | ||
116 | -router.get(/^\/(.*?)-sale/, rewrite.resolve, sale.index); | 115 | +router.get('/:channel-sale/vip(/:pathParams)?', |
116 | + rewrite.resolve, | ||
117 | + rewrite.resolvePathParams, | ||
118 | + sale.vip); | ||
119 | +router.get('/:channel-sale/', rewrite.resolve, sale.index); | ||
117 | 120 | ||
118 | router.get('/sale/discount', sale.discount); | 121 | router.get('/sale/discount', sale.discount); |
119 | router.get('/sale/discount/detail', sale.discountDetail); | 122 | router.get('/sale/discount/detail', sale.discountDetail); |
@@ -147,10 +150,10 @@ router.get('/search/search', search.search); // ajax 请求商品数据 | @@ -147,10 +150,10 @@ router.get('/search/search', search.search); // ajax 请求商品数据 | ||
147 | router.get('/search/brand/goods', search.searchBrandGoods); // 搜索品牌下的商品 | 150 | router.get('/search/brand/goods', search.searchBrandGoods); // 搜索品牌下的商品 |
148 | router.get('/search/shop/goods', search.searchShopGoods); // 搜索店铺下的商品 | 151 | router.get('/search/shop/goods', search.searchShopGoods); // 搜索店铺下的商品 |
149 | 152 | ||
150 | -router.get('/list/global(/*)?', rewrite.resolvePathParams, globalPro.list); // 全球购路由重写 全球购列表页 | 153 | +router.get('/list/global(/:pathParams)?', rewrite.resolvePathParams, globalPro.list); // 全球购路由重写 全球购列表页 |
151 | router.get('/index/index', rewrite.sortParams, list.category); // 旧品类首页 | 154 | router.get('/index/index', rewrite.sortParams, list.category); // 旧品类首页 |
152 | router.get('/list/index', rewrite.sortParams, list.category); // 兼容 PC 的链接 | 155 | router.get('/list/index', rewrite.sortParams, list.category); // 兼容 PC 的链接 |
153 | -router.get('/list(/*)?', rewrite.resolvePathParams, list.listNew); // 列表新的 URL | 156 | +router.get('/list(/:pathParams)?', rewrite.resolvePathParams, list.listNew); // 列表新的 URL |
154 | router.get('/search/category', | 157 | router.get('/search/category', |
155 | cors, | 158 | cors, |
156 | rewrite.resolvePathParamsAjax, | 159 | rewrite.resolvePathParamsAjax, |
@@ -164,7 +167,7 @@ router.get('/index/getBrandCouponsList', list.getBrandCouponsList); | @@ -164,7 +167,7 @@ router.get('/index/getBrandCouponsList', list.getBrandCouponsList); | ||
164 | 167 | ||
165 | router.get('/shop', newShop.redirect); // 老路由重定向前置处理 | 168 | router.get('/shop', newShop.redirect); // 老路由重定向前置处理 |
166 | router.get('/shop/:domain-:shop_id.html', newShop.resolveParams); // 新入口 | 169 | router.get('/shop/:domain-:shop_id.html', newShop.resolveParams); // 新入口 |
167 | -router.get('/shop/:domain-:shop_id/*', rewrite.resolvePathParams, newShop.goodsList); // 店铺商品列表 | 170 | +router.get('/shop/:domain-:shop_id+(/:pathParams)?', rewrite.resolvePathParams, newShop.goodsList); // 店铺商品列表 |
168 | router.get('/shop/goodslist', | 171 | router.get('/shop/goodslist', |
169 | cors, | 172 | cors, |
170 | rewrite.resolvePathParamsAjax, | 173 | rewrite.resolvePathParamsAjax, |
@@ -184,7 +187,7 @@ router.get('/index/allBrand', newShop.allBrand); // 店铺全部品牌 | @@ -184,7 +187,7 @@ router.get('/index/allBrand', newShop.allBrand); // 店铺全部品牌 | ||
184 | router.get('/new', rewrite.channel, news.newGoodsRedirect); | 187 | router.get('/new', rewrite.channel, news.newGoodsRedirect); |
185 | 188 | ||
186 | // 新品到着 SEO优化 | 189 | // 新品到着 SEO优化 |
187 | -router.get(/^\/(.*?)-new/, rewrite.resolve, rewrite.resolvePathParams, news.newGoods); | 190 | +router.get('/:channel-new(/:pathParams)?', rewrite.resolve, rewrite.resolvePathParams, news.newGoods); |
188 | router.get('/list/new', news.newGoods); // 兼容 PC 的链接 | 191 | router.get('/list/new', news.newGoods); // 兼容 PC 的链接 |
189 | router.get('/new/selectNewSale', rewrite.resolvePathParamsAjax, news.selectNewSale); | 192 | router.get('/new/selectNewSale', rewrite.resolvePathParamsAjax, news.selectNewSale); |
190 | router.get('/new/filter', rewrite.resolvePathParamsAjax, news.filter); | 193 | router.get('/new/filter', rewrite.resolvePathParamsAjax, news.filter); |
-
Please register or login to post a comment