From 16a78c81139e7eac4457ca26919ca8d73cb57da6 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 20 Mar 2026 21:51:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=94=81=E5=AE=9A=E5=B1=8F?= =?UTF-8?q?=E5=B9=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/store/modules/user.js | 2 ++ ruoyi-ui/src/views/lock.vue | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ruoyi-ui/src/store/modules/user.js b/ruoyi-ui/src/store/modules/user.js index 83a7d625..e6439e02 100644 --- a/ruoyi-ui/src/store/modules/user.js +++ b/ruoyi-ui/src/store/modules/user.js @@ -1,3 +1,4 @@ +import store from '@/store' import router from '@/router' import { MessageBox, } from 'element-ui' import { login, logout, getInfo } from '@/api/login' @@ -51,6 +52,7 @@ const user = { login(username, password, code, uuid).then(res => { setToken(res.token) commit('SET_TOKEN', res.token) + store.dispatch('lock/unlockScreen') resolve() }).catch(error => { reject(error) diff --git a/ruoyi-ui/src/views/lock.vue b/ruoyi-ui/src/views/lock.vue index 17c98c67..d6abf085 100644 --- a/ruoyi-ui/src/views/lock.vue +++ b/ruoyi-ui/src/views/lock.vue @@ -97,7 +97,7 @@ export default { await this.$store.dispatch('lock/unlockScreen') this.$router.replace(lockPath) } catch (err) { - const msg = (err.response && err.response.data && err.response.data.msg) || err.msg || '密码错误,请重新输入' + const msg = err.message || err.toString() this.showError(msg) this.password = '' this.$refs.passwordInput && this.$refs.passwordInput.focus()