Commit d1600036 by 胡悦

修复

1 parent 3111b7b0
Showing 1 changed file with 6 additions and 6 deletions
...@@ -27,6 +27,7 @@ App({ ...@@ -27,6 +27,7 @@ App({
}, },
login(returnResponse) { login(returnResponse) {
let _this = this let _this = this
let openId = null
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
wx.login({ wx.login({
success({ success({
...@@ -38,7 +39,7 @@ App({ ...@@ -38,7 +39,7 @@ App({
}).then(res => { }).then(res => {
wx.$authStatus = res.code != 0 wx.$authStatus = res.code != 0
util.setSessionId(res.data.sessionId) util.setSessionId(res.data.sessionId)
const openId = res.data.openId openId = res.data.openId
util.setStorageSync('openId', openId) util.setStorageSync('openId', openId)
ssoApi.getUserInfo({ ssoApi.getUserInfo({
openId openId
...@@ -54,6 +55,10 @@ App({ ...@@ -54,6 +55,10 @@ App({
resolve(result) resolve(result)
} }
}) })
}).catch(() => {
wx.$authStatus = true
reject()
})
if (wx.$trackData.scene) { if (wx.$trackData.scene) {
_this.getScene(wx.$trackData.scene).then(res => { _this.getScene(wx.$trackData.scene).then(res => {
wx.$trackData.merchant = res.merchantId wx.$trackData.merchant = res.merchantId
...@@ -63,11 +68,6 @@ App({ ...@@ -63,11 +68,6 @@ App({
wx.$Track.sendTrack(trackData.COMPANY, openId) wx.$Track.sendTrack(trackData.COMPANY, openId)
}) })
} }
}).catch(() => {
wx.$authStatus = true
reject()
})
} }
}) })
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!