Showing
5 changed files
with
8 additions
and
7 deletions
@@ -8,7 +8,7 @@ Name | Path | Note | @@ -8,7 +8,7 @@ Name | Path | Note | ||
8 | 全部分类 | /cate-all | | 8 | 全部分类 | /cate-all | |
9 | 商品列表 | /product/list?sort=1 | | 9 | 商品列表 | /product/list?sort=1 | |
10 | 品牌店铺 | /product/shop/{domain} | | 10 | 品牌店铺 | /product/shop/{domain} | |
11 | -品牌店铺分享页面 | /brand/share/{domain} | | 11 | +品牌店铺分享页面 | /product/shop/{domain}/share | |
12 | 商品详情 | /product/{productId} | | 12 | 商品详情 | /product/{productId} | |
13 | 新品抢先看 | /product/new | | 13 | 新品抢先看 | /product/new | |
14 | 搜索页 | /product/search?query=xxx | | 14 | 搜索页 | /product/search?query=xxx | |
@@ -16,7 +16,7 @@ module.exports = { | @@ -16,7 +16,7 @@ module.exports = { | ||
16 | res.render('shop/index', { | 16 | res.render('shop/index', { |
17 | module: 'product', | 17 | module: 'product', |
18 | page: 'shop', | 18 | page: 'shop', |
19 | - domain: req.params[0] | 19 | + domain: req.params.domain |
20 | }); | 20 | }); |
21 | }, | 21 | }, |
22 | 22 | ||
@@ -77,7 +77,7 @@ module.exports = { | @@ -77,7 +77,7 @@ module.exports = { | ||
77 | res.render('shop/share', { | 77 | res.render('shop/share', { |
78 | module: 'product', | 78 | module: 'product', |
79 | page: 'shop-share', | 79 | page: 'shop-share', |
80 | - domain: req.params[0] | 80 | + domain: req.params.domain |
81 | }); | 81 | }); |
82 | } | 82 | } |
83 | }; | 83 | }; |
@@ -33,11 +33,11 @@ router.get('/product/list.json', productList.fetchProducts); | @@ -33,11 +33,11 @@ router.get('/product/list.json', productList.fetchProducts); | ||
33 | const shop = require(`${cRoot}/shop`); | 33 | const shop = require(`${cRoot}/shop`); |
34 | 34 | ||
35 | router.get('/brand', shop.index); // 品牌 集合页 | 35 | router.get('/brand', shop.index); // 品牌 集合页 |
36 | -router.get(/\/brand\/share\/(.*)/, shop.shopShare); // 品牌店铺分享页面 | ||
37 | router.get('/product/shop/info.json', shop.getShopInfo); // 店铺介绍 | 36 | router.get('/product/shop/info.json', shop.getShopInfo); // 店铺介绍 |
38 | router.get('/product/shop/goods.json', shop.getBrandShopGoods); // 店铺商品列表 | 37 | router.get('/product/shop/goods.json', shop.getBrandShopGoods); // 店铺商品列表 |
39 | router.post('/product/shop/collect.json', shop.collectShop); // 收藏品牌店铺 | 38 | router.post('/product/shop/collect.json', shop.collectShop); // 收藏品牌店铺 |
40 | -router.get('/product/shop/(.*)/', shop.index); // 品牌店铺页 | 39 | +router.get('/product/shop/:domain/', shop.index); // 品牌店铺页 |
40 | +router.get('/product/shop/:domain/share', shop.shopShare); // 品牌店铺页 | ||
41 | 41 | ||
42 | // 商品详情controller | 42 | // 商品详情controller |
43 | const detail = require(`${cRoot}/detail`); | 43 | const detail = require(`${cRoot}/detail`); |
@@ -51,6 +51,7 @@ router.get(/\/product\/cart-count.json/, detail.getCartCount); | @@ -51,6 +51,7 @@ router.get(/\/product\/cart-count.json/, detail.getCartCount); | ||
51 | router.get(/\/product\/search_product\.json/, detail.search); | 51 | router.get(/\/product\/search_product\.json/, detail.search); |
52 | 52 | ||
53 | // alias: TODO: 测试完成 删除一下router,并更新资源位 | 53 | // alias: TODO: 测试完成 删除一下router,并更新资源位 |
54 | +router.get(/\/brand\/share\/(.*)/, shop.shopShare); // 品牌店铺分享页面 | ||
54 | router.get(/\/item\/([\d]+)(.*)\.html/, detail.index); // 商品详情routers | 55 | router.get(/\/item\/([\d]+)(.*)\.html/, detail.index); // 商品详情routers |
55 | router.get(/\/brand\/(.*)/, shop.index); // 店铺首页 | 56 | router.get(/\/brand\/(.*)/, shop.index); // 店铺首页 |
56 | 57 |
@@ -50,7 +50,7 @@ Vue.filter('clothingGenderIdentity', (value) => { | @@ -50,7 +50,7 @@ Vue.filter('clothingGenderIdentity', (value) => { | ||
50 | * @param value brand domain | 50 | * @param value brand domain |
51 | */ | 51 | */ |
52 | Vue.filter('brandUrl', (value) => { | 52 | Vue.filter('brandUrl', (value) => { |
53 | - return `/brand/${value}`; | 53 | + return `/product/shop/${value}`; |
54 | }); | 54 | }); |
55 | 55 | ||
56 | /** | 56 | /** |
@@ -86,7 +86,7 @@ | @@ -86,7 +86,7 @@ | ||
86 | this.shareData = { | 86 | this.shareData = { |
87 | title: result.shopName, | 87 | title: result.shopName, |
88 | des: shareSubTitle, | 88 | des: shareSubTitle, |
89 | - url: location.origin + '/brand/share/' + $shop.data('domain'), | 89 | + url: location.origin + '/product/shop/' + $shop.data('domain')+'/share', |
90 | img: result.shopBg, | 90 | img: result.shopBg, |
91 | isBlkShop: result.isBlkShop, | 91 | isBlkShop: result.isBlkShop, |
92 | domain: locationQuery.domain, | 92 | domain: locationQuery.domain, |
-
Please register or login to post a comment