Authored by 郭成尧

verify-path

@@ -40,5 +40,7 @@ router.get('/activity/manifest.json', pwa.manifest); @@ -40,5 +40,7 @@ router.get('/activity/manifest.json', pwa.manifest);
40 // 小程序使用的域名验证文件 40 // 小程序使用的域名验证文件
41 router.get('/hfxRaNY27L.txt', miniapp.verify); 41 router.get('/hfxRaNY27L.txt', miniapp.verify);
42 router.get('/activity/hfxRaNY27L.txt', miniapp.verify); 42 router.get('/activity/hfxRaNY27L.txt', miniapp.verify);
  43 +router.get('/shop/hfxRaNY27L.txt', miniapp.verify);
  44 +router.get('/product/hfxRaNY27L.txt', miniapp.verify);
43 45
44 module.exports = router; 46 module.exports = router;
@@ -59,7 +59,7 @@ module.exports = () => { @@ -59,7 +59,7 @@ module.exports = () => {
59 req.url = `/product/search${req.path}`; 59 req.url = `/product/search${req.path}`;
60 } 60 }
61 61
62 - if (/^\/(list|shop)/.test(req.url)) { 62 + if (/^\/(list|shop)/.test(req.url) && req.url.indexOf('hfxRaNY27L') < 0) {
63 // 商品列表页、全球购商品列表页、店铺首页路由 63 // 商品列表页、全球购商品列表页、店铺首页路由
64 req.url = `/product${req.url}`; 64 req.url = `/product${req.url}`;
65 } 65 }