Authored by 郝肖肖

'minipath-router'

@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 7
8 const request = require('request-promise'); 8 const request = require('request-promise');
9 9
10 -const miniapp = (req, res, next) => { 10 +const miniapp = (req, res) => {
11 return request({ 11 return request({
12 baseUrl: global.yoho.config.domains.api, 12 baseUrl: global.yoho.config.domains.api,
13 uri: 'wechat/miniapp/img-check.jpg', 13 uri: 'wechat/miniapp/img-check.jpg',
@@ -24,6 +24,6 @@ router.post('/hf/v1', hotfix.v1); @@ -24,6 +24,6 @@ router.post('/hf/v1', hotfix.v1);
24 router.post('/rn/v1', rn.v1); 24 router.post('/rn/v1', rn.v1);
25 25
26 router.get('/.well-known/apple-app-site-association', apple.appSiteAssociation); 26 router.get('/.well-known/apple-app-site-association', apple.appSiteAssociation);
27 -router.get('/wechat/miniapp.jpg', forward.miniapp); 27 +router.get('/api/wechat/miniapp.jpg', forward.miniapp);
28 28
29 module.exports = router; 29 module.exports = router;
@@ -73,7 +73,7 @@ const newDetail = { @@ -73,7 +73,7 @@ const newDetail = {
73 pageFooter: true, 73 pageFooter: true,
74 localCss: true, 74 localCss: true,
75 appPath: appPath, 75 appPath: appPath,
76 - miniPath: helpers.urlFormat('/wechat/miniapp.jpg', { 76 + miniPath: helpers.urlFormat('/api/wechat/miniapp.jpg', {
77 miniapp_type: 0, 77 miniapp_type: 0,
78 param: result.productSkn, 78 param: result.productSkn,
79 miniQrType: 1 79 miniQrType: 1
@@ -191,7 +191,7 @@ const shop = { @@ -191,7 +191,7 @@ const shop = {
191 } 191 }
192 192
193 // param:品牌ID, name:品牌名称, miniQrType 1:商品 2 品牌,miniapp_type 0:有货,1:新与力 193 // param:品牌ID, name:品牌名称, miniQrType 1:商品 2 品牌,miniapp_type 0:有货,1:新与力
194 - let miniPath = helpers.urlFormat('/wechat/miniapp.jpg', { 194 + let miniPath = helpers.urlFormat('/api/wechat/miniapp.jpg', {
195 miniapp_type: 0, 195 miniapp_type: 0,
196 param: _.get(brands, '[0].brand_id', 0), 196 param: _.get(brands, '[0].brand_id', 0),
197 name: encodeURIComponent(_.get(brands, '[0].brand_name', '')), 197 name: encodeURIComponent(_.get(brands, '[0].brand_name', '')),