|
|
@@ -73,8 +73,12 @@
|
|
|
}
|
|
|
if (!info && !this.$route.query.code) {
|
|
|
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb3274b676737a319&redirect_uri=https://www.usoftmall.com/mobile/wechat&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
|
|
|
+ // window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb3274b676737a319&redirect_uri=https://www.usoftmall.com/mobile/wechat&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
|
|
|
} else if (info) {
|
|
|
- this.$store.commit('option/REQUEST_WECHATINFO_STATUS_SUCCESS', JSON.parse(info))
|
|
|
+ info = JSON.parse(info)
|
|
|
+ if (info.status === 1) {
|
|
|
+ this.$store.dispatch('GerWechatInfo', {code: '', openId: info.openid})
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$store.dispatch('GerWechatInfo', {code: this.$route.query.code})
|
|
|
}
|
|
|
@@ -127,10 +131,12 @@
|
|
|
this.$store.commit('option/REQUEST_WECHATINFO_STATUS_SUCCESS', res.data)
|
|
|
localStorage.setItem('USOFTMALLWECHATINFO', JSON.stringify(res.data))
|
|
|
} else {
|
|
|
+ localStorage.removeItem('USOFTMALLWECHATINFO')
|
|
|
this.collectResult = res.data.message
|
|
|
this.timeoutCount++
|
|
|
}
|
|
|
}, err => {
|
|
|
+ localStorage.removeItem('USOFTMALLWECHATINFO')
|
|
|
this.collectResult = err.response.data || '绑定失败'
|
|
|
this.timeoutCount++
|
|
|
})
|