Merge branch 'feature/verifytxt' into 'master'
Feature/verifytxt See merge request !1306
Showing
4 changed files
with
20 additions
and
2 deletions
@@ -4,7 +4,18 @@ | @@ -4,7 +4,18 @@ | ||
4 | const path = require('path'); | 4 | const path = require('path'); |
5 | 5 | ||
6 | module.exports = { | 6 | module.exports = { |
7 | + | ||
8 | + /** | ||
9 | + * 有货小程序验证 | ||
10 | + */ | ||
7 | verify(req, res) { | 11 | verify(req, res) { |
8 | res.sendFile(path.join(__dirname, '../../../public/static/hfxRaNY27L.txt')); | 12 | res.sendFile(path.join(__dirname, '../../../public/static/hfxRaNY27L.txt')); |
13 | + }, | ||
14 | + | ||
15 | + /** | ||
16 | + * 线下店小程序验证 | ||
17 | + */ | ||
18 | + store(req, res) { | ||
19 | + res.sendFile(path.join(__dirname, '../../../public/static/OFRuhJ43rY.txt')); | ||
9 | } | 20 | } |
10 | }; | 21 | }; |
@@ -40,7 +40,13 @@ router.get('/activity/manifest.json', pwa.manifest); | @@ -40,7 +40,13 @@ 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); | 43 | +router.get('/product/shop/hfxRaNY27L.txt', miniapp.verify); |
44 | router.get('/product/hfxRaNY27L.txt', miniapp.verify); | 44 | router.get('/product/hfxRaNY27L.txt', miniapp.verify); |
45 | 45 | ||
46 | +// 线下店使用的域名验证文件 | ||
47 | +router.get('/OFRuhJ43rY.txt', miniapp.store); | ||
48 | +router.get('/activity/OFRuhJ43rY.txt', miniapp.store); | ||
49 | +router.get('/product/shop/OFRuhJ43rY.txt', miniapp.store); | ||
50 | +router.get('/product/OFRuhJ43rY.txt', miniapp.store); | ||
51 | + | ||
46 | module.exports = router; | 52 | 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) && req.url.indexOf('hfxRaNY27L') < 0) { | 62 | + if (/^\/(list|shop)/.test(req.url)) { |
63 | // 商品列表页、全球购商品列表页、店铺首页路由 | 63 | // 商品列表页、全球购商品列表页、店铺首页路由 |
64 | req.url = `/product${req.url}`; | 64 | req.url = `/product${req.url}`; |
65 | } | 65 | } |
public/static/OFRuhJ43rY.txt
0 → 100644
1 | +84e2e0416b10c7872b4983ad2c63892e |
-
Please register or login to post a comment