no message

This commit is contained in:
2025-09-16 14:06:56 +08:00
parent 01eaf92591
commit 37185f03cd

View File

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