Authored by 毕凯

Merge branch 'feature/verifytxt' into 'master'

Feature/verifytxt



See merge request !1306
... ... @@ -4,7 +4,18 @@
const path = require('path');
module.exports = {
/**
* 有货小程序验证
*/
verify(req, res) {
res.sendFile(path.join(__dirname, '../../../public/static/hfxRaNY27L.txt'));
},
/**
* 线下店小程序验证
*/
store(req, res) {
res.sendFile(path.join(__dirname, '../../../public/static/OFRuhJ43rY.txt'));
}
};
... ...
... ... @@ -40,7 +40,13 @@ router.get('/activity/manifest.json', pwa.manifest);
// 小程序使用的域名验证文件
router.get('/hfxRaNY27L.txt', miniapp.verify);
router.get('/activity/hfxRaNY27L.txt', miniapp.verify);
router.get('/shop/hfxRaNY27L.txt', miniapp.verify);
router.get('/product/shop/hfxRaNY27L.txt', miniapp.verify);
router.get('/product/hfxRaNY27L.txt', miniapp.verify);
// 线下店使用的域名验证文件
router.get('/OFRuhJ43rY.txt', miniapp.store);
router.get('/activity/OFRuhJ43rY.txt', miniapp.store);
router.get('/product/shop/OFRuhJ43rY.txt', miniapp.store);
router.get('/product/OFRuhJ43rY.txt', miniapp.store);
module.exports = router;
... ...
... ... @@ -59,7 +59,7 @@ module.exports = () => {
req.url = `/product/search${req.path}`;
}
if (/^\/(list|shop)/.test(req.url) && req.url.indexOf('hfxRaNY27L') < 0) {
if (/^\/(list|shop)/.test(req.url)) {
// 商品列表页、全球购商品列表页、店铺首页路由
req.url = `/product${req.url}`;
}
... ...
84e2e0416b10c7872b4983ad2c63892e
\ No newline at end of file
... ...