Showing
2 changed files
with
5 additions
and
1 deletions
@@ -79,7 +79,7 @@ const common = { | @@ -79,7 +79,7 @@ const common = { | ||
79 | refer && !/signin|login|passport/.test(refer) && res.cookie('refer', encodeURI(refer), { | 79 | refer && !/signin|login|passport/.test(refer) && res.cookie('refer', encodeURI(refer), { |
80 | domain: 'yohobuy.com' | 80 | domain: 'yohobuy.com' |
81 | }); | 81 | }); |
82 | - if (req.yoho.isApp) { | 82 | + if (req.yoho.isApp || req.yoho.isMarsApp) { |
83 | return next({ | 83 | return next({ |
84 | code: 401, | 84 | code: 401, |
85 | message: 'weblogin', | 85 | message: 'weblogin', |
@@ -64,6 +64,10 @@ module.exports = () => { | @@ -64,6 +64,10 @@ module.exports = () => { | ||
64 | yoho.isqq = /MQQBrowser/i.test(req.get('User-Agent') || ''); | 64 | yoho.isqq = /MQQBrowser/i.test(req.get('User-Agent') || ''); |
65 | yoho.isMarsApp = /yohomars/i.test(req.get('User-Agent') || ''); | 65 | yoho.isMarsApp = /yohomars/i.test(req.get('User-Agent') || ''); |
66 | 66 | ||
67 | + if (yoho.isMarsApp) { | ||
68 | + yoho.isApp = false; | ||
69 | + } | ||
70 | + | ||
67 | Object.assign(res.locals, yoho); | 71 | Object.assign(res.locals, yoho); |
68 | Object.assign(req.yoho, yoho); | 72 | Object.assign(req.yoho, yoho); |
69 | 73 |
-
Please register or login to post a comment