From 2c9d62dcca4f368394140a0eb9f3be12528ec079 Mon Sep 17 00:00:00 2001 From: bjang03 <259278618@qq.com> Date: Mon, 30 Sep 2024 12:11:53 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E5=AF=86=E7=A0=81=E7=AD=96=E7=95=A5?= =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=8F=98=E6=9B=B4=EF=BC=8CHL-6189?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/axios/service.ts | 2 +- src/views/login/components/LoginForm.vue | 26 +++++++++++++++--------- src/views/system/user/index.vue | 3 ++- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/config/axios/service.ts b/src/config/axios/service.ts index 9f38c95eb..958d2a79b 100644 --- a/src/config/axios/service.ts +++ b/src/config/axios/service.ts @@ -182,7 +182,7 @@ service.interceptors.response.use( '
5 分钟搭建本地环境
' }) return Promise.reject(new Error(msg)) - } else if (code === 1002000010) { + } else if (code === 1002000008) { if (msg === '无效的刷新令牌') { // hard coding:忽略这个提示,直接登出 console.log(msg) diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue index ed783f5c6..17461d467 100644 --- a/src/views/login/components/LoginForm.vue +++ b/src/views/login/components/LoginForm.vue @@ -262,7 +262,7 @@ switch (differenceDays){ case null: break - case 0: + case 0 || 1: await ElMessageBox.alert( '密码到期,请立即修改', '重要提示', @@ -272,15 +272,15 @@ ) router.push({path:"/updatePasswordNewTips",query:{username:loginData.loginForm.username}}) return - case 1: - await ElMessageBox.alert( - '密码过期,请联系管理员修改', - '重要提示', - { - dangerouslyUseHTMLString: true, - } - ) - return + // case 1: + // await ElMessageBox.alert( + // '密码过期,请联系管理员修改', + // '重要提示', + // { + // dangerouslyUseHTMLString: true, + // } + // ) + // return default: await ElMessageBox.alert( '密码'+differenceDays+'到期,请尽快修改。', @@ -330,6 +330,12 @@ // 存储 部门信息 const { wsCache } = useCache() wsCache.set(CACHE_KEY.DEPT, await DeptApi.getSimpleDeptList()) + }catch (e){ + if(e.code === 1002000008){ + setTimeout(function (){ + router.push({path:"/updatePasswordNewTips",query:{username:loginData.loginForm.username}}) + },1500) + } }finally { console.log('登录-224') loginLoading.value = false diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index d2d28220c..ba402fc09 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -59,6 +59,8 @@ + +