Showing
4 changed files
with
11 additions
and
2 deletions
@@ -89,6 +89,8 @@ passport.use(new LocalStrategy({ | @@ -89,6 +89,8 @@ passport.use(new LocalStrategy({ | ||
89 | done({code: 4189}, null); | 89 | done({code: 4189}, null); |
90 | } else if (result.code && result.code === 510) { | 90 | } else if (result.code && result.code === 510) { |
91 | done(null, Object.assign(result.data, {weakPassword: true})); | 91 | done(null, Object.assign(result.data, {weakPassword: true})); |
92 | + } else if (result.code && result.code === 50004) { | ||
93 | + done(result, null); | ||
92 | } else if (result.code) { | 94 | } else if (result.code) { |
93 | done(result.message, null); | 95 | done(result.message, null); |
94 | } else { | 96 | } else { |
@@ -283,6 +283,13 @@ const local = { | @@ -283,6 +283,13 @@ const local = { | ||
283 | }; | 283 | }; |
284 | 284 | ||
285 | return res.json(obj); | 285 | return res.json(obj); |
286 | + } else if (_.get(err, 'code', 400) === 50004) { | ||
287 | + // 强制绑定手机号需要邮箱和密码 | ||
288 | + req.session.bindEmail = req.body.account; | ||
289 | + req.session.bindPassword = req.body.password; | ||
290 | + return res.json(Object.assign(err, { | ||
291 | + url: '//m.yohobuy.com/passport/bind/forceBindMobile' | ||
292 | + })); | ||
286 | } else { | 293 | } else { |
287 | let obj = { | 294 | let obj = { |
288 | code: 400, | 295 | code: 400, |
@@ -139,7 +139,7 @@ class Login { | @@ -139,7 +139,7 @@ class Login { | ||
139 | localStorage.loginJumpUrl = $('#account').val(); | 139 | localStorage.loginJumpUrl = $('#account').val(); |
140 | localStorage.loginJump = 'true'; | 140 | localStorage.loginJump = 'true'; |
141 | location.href = data.url; | 141 | location.href = data.url; |
142 | - } else if (data.code === 510) { | 142 | + } else if (data.code === 510 || data.code === 50004) { |
143 | location.href = data.url; | 143 | location.href = data.url; |
144 | } else { | 144 | } else { |
145 | $captcha.data('userverify', data.captchaShow); | 145 | $captcha.data('userverify', data.captchaShow); |
@@ -100,7 +100,7 @@ function loginAuth(params, acc) { | @@ -100,7 +100,7 @@ function loginAuth(params, acc) { | ||
100 | localStorage.loginJumpUrl = $('#account').val(); | 100 | localStorage.loginJumpUrl = $('#account').val(); |
101 | localStorage.loginJump = 'true'; | 101 | localStorage.loginJump = 'true'; |
102 | location.href = data.url; | 102 | location.href = data.url; |
103 | - } else if (data.code === 510) { | 103 | + } else if (data.code === 510 || data.code === 50004) { |
104 | location.href = data.url; | 104 | location.href = data.url; |
105 | } else { | 105 | } else { |
106 | $captcha.data('userverify', data.captchaShow); | 106 | $captcha.data('userverify', data.captchaShow); |
-
Please register or login to post a comment