diff --git a/src/pages/login.vue b/src/pages/login.vue index 15437a73..acd17344 100644 --- a/src/pages/login.vue +++ b/src/pages/login.vue @@ -87,11 +87,13 @@ export default { } let {code} = this.$route.query this.getToken({code}).then(token => { - this.login(token) - if (module != 'AppCountryAlbum') { - this.getAccount({module}) + if (token) { + this.login(token) + if (module != 'AppCountryAlbum') { + this.getAccount({module}) + } + this.target ? uni.reLaunch({url: this.target}) : uni.navigateBack({}) } - this.target ? uni.reLaunch({url: this.target}) : uni.navigateBack({}) }).catch(err => { this.err = err })