Showing
4 changed files
with
8 additions
and
8 deletions
@@ -3,15 +3,15 @@ | @@ -3,15 +3,15 @@ | ||
3 | * @author: xiaoxiao<xiaoxiao.hao@yoho.cn> | 3 | * @author: xiaoxiao<xiaoxiao.hao@yoho.cn> |
4 | * @date: 2018/01/4 | 4 | * @date: 2018/01/4 |
5 | */ | 5 | */ |
6 | - | ||
7 | 'use strict'; | 6 | 'use strict'; |
8 | 7 | ||
9 | const request = require('request-promise'); | 8 | const request = require('request-promise'); |
10 | -const querystring = require('querystring'); | ||
11 | 9 | ||
12 | -const index = (req, res, next) => { | 10 | +const miniapp = (req, res, next) => { |
13 | return request({ | 11 | return request({ |
14 | - url: `${global.yoho.config.domains.api}wechat/miniapp/img-check.jpg?${querystring.stringify(req.query)}`, | 12 | + baseUrl: global.yoho.config.domains.api, |
13 | + uri: 'wechat/miniapp/img-check.jpg', | ||
14 | + qs: req.query, | ||
15 | headers: { | 15 | headers: { |
16 | 'X-request-ID': req.reqID || '', | 16 | 'X-request-ID': req.reqID || '', |
17 | 'X-YOHO-IP': req.yoho.clientIp || '', | 17 | 'X-YOHO-IP': req.yoho.clientIp || '', |
@@ -22,5 +22,5 @@ const index = (req, res, next) => { | @@ -22,5 +22,5 @@ const index = (req, res, next) => { | ||
22 | }; | 22 | }; |
23 | 23 | ||
24 | module.exports = { | 24 | module.exports = { |
25 | - index | 25 | + miniapp |
26 | }; | 26 | }; |
@@ -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('/mini-check.jpg', forward.index); | 27 | +router.get('/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('/mini-check.jpg', { | 76 | + miniPath: helpers.urlFormat('/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('/mini-check.jpg', { | 194 | + let miniPath = helpers.urlFormat('/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', '')), |
-
Please register or login to post a comment