Merge branch 'feature/guang2' into 'release/5.8'
packageData-version See merge request !654
Showing
1 changed file
with
3 additions
and
2 deletions
@@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
3 | const _ = require('lodash'); | 3 | const _ = require('lodash'); |
4 | const cookie = global.yoho.cookie; | 4 | const cookie = global.yoho.cookie; |
5 | const authcode = require('../../utils/authcode'); | 5 | const authcode = require('../../utils/authcode'); |
6 | +const config = global.yoho.config; | ||
6 | 7 | ||
7 | module.exports = () => { | 8 | module.exports = () => { |
8 | return (req, res, next) => { | 9 | return (req, res, next) => { |
@@ -48,7 +49,7 @@ module.exports = () => { | @@ -48,7 +49,7 @@ module.exports = () => { | ||
48 | return _.parseInt(req.cookies.app_uid); | 49 | return _.parseInt(req.cookies.app_uid); |
49 | }, | 50 | }, |
50 | sessionKey: req.cookies.app_session_key, | 51 | sessionKey: req.cookies.app_session_key, |
51 | - appVersion: req.query.app_version || req.cookies.app_version, | 52 | + appVersion: req.query.app_version || req.cookies.app_version || config.appVersion, |
52 | appSessionType: req.cookies.app_client_type | 53 | appSessionType: req.cookies.app_client_type |
53 | }; | 54 | }; |
54 | } | 55 | } |
@@ -62,7 +63,7 @@ module.exports = () => { | @@ -62,7 +63,7 @@ module.exports = () => { | ||
62 | )) | 63 | )) |
63 | ) { | 64 | ) { |
64 | let appUid = req.query.uid || req.cookies.app_uid; | 65 | let appUid = req.query.uid || req.cookies.app_uid; |
65 | - let appVersion = req.query.app_version || req.cookies.app_version; | 66 | + let appVersion = req.query.app_version || req.cookies.app_version || config.appVersion; |
66 | let appSessionType = req.query.client_type || req.cookies.app_client_type; | 67 | let appSessionType = req.query.client_type || req.cookies.app_client_type; |
67 | 68 | ||
68 | req.query.uid = { | 69 | req.query.uid = { |
-
Please register or login to post a comment