Showing
1 changed file
with
4 additions
and
1 deletions
@@ -32,7 +32,10 @@ function doPassportCallback(openId, nickname, sourceType, req, res) { | @@ -32,7 +32,10 @@ function doPassportCallback(openId, nickname, sourceType, req, res) { | ||
32 | } | 32 | } |
33 | if (openId && nickname) { | 33 | if (openId && nickname) { |
34 | return AuthHelper.signinByOpenID(nickname, openId, sourceType, shoppingKey).then((result) => { | 34 | return AuthHelper.signinByOpenID(nickname, openId, sourceType, shoppingKey).then((result) => { |
35 | - if (result && result.data['is_bind'] && result.data['is_bind'] === 'N') { //eslint-disable-line | 35 | + if (result.code !== 200) { |
36 | + return Promise.reject(result); | ||
37 | + } | ||
38 | + if (result.data['is_bind'] && result.data['is_bind'] === 'N') { //eslint-disable-line | ||
36 | return helpers.urlFormat('/passport/bind/index', { | 39 | return helpers.urlFormat('/passport/bind/index', { |
37 | openId: openId, | 40 | openId: openId, |
38 | sourceType: sourceType, | 41 | sourceType: sourceType, |
-
Please register or login to post a comment