diff --git a/src/pages/login.vue b/src/pages/login.vue index f0a59b7f..87b789de 100644 --- a/src/pages/login.vue +++ b/src/pages/login.vue @@ -59,12 +59,15 @@ export default { corpId = 'ww2a667717a70164f1' module = 'wangge' } + this.setModule(module) this.getToken({...this.form, module, corpId}).then(token => { - this.login(token) - if (module != 'AppCountryAlbum') { - this.getAccount({module}).then(() => this.setModule(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(() => 0) } })