diff --git a/pages/login/login.vue b/pages/login/login.vue index a92022f..7fdbac6 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -89,22 +89,17 @@ } try { let res = await handLogin(this.user, RSAencrypt(this.password)) - if (res.code === '200') { + if (res) { if (this.saveUser) { this.$store.dispatch('saveLoginName', this.user) } else { this.$store.dispatch('delLoginName', '') } - this.$store.dispatch('saveUserInfo', JSON.stringify(res.data.user)) - this.$store.dispatch('saveToken', res.data.token) + this.$store.dispatch('saveUserInfo', JSON.stringify(res.user.user)) + this.$store.dispatch('saveToken', res.token) uni.redirectTo({ url: '/pages/home/home' }) - } else { - uni.showToast({ - title: res.msg, - icon: 'none' - }) } this.disabled = false } catch (e) {