From 06363ec191dd5915ced4556ff03e64fffc5b3b54 Mon Sep 17 00:00:00 2001 From: chenqi Date: Mon, 8 Jun 2026 13:06:38 +0800 Subject: [PATCH] =?UTF-8?q?fix(user):=20=E8=A7=A3=E5=86=B3=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E8=B4=A6=E6=88=B7=E6=97=B6=E6=A0=87=E7=AD=BE=E9=A1=B5?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=AE=8B=E7=95=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 导入 tagsView 模块以管理标签页状态 - 在用户登出时清除标签页内存状态 - 添加异常处理避免标签页清理失败影响登出流程 - 修复切换账户时页面标签残留的安全风险 - 在检查清单文档开头添加空行以符合格式规范 --- MD/specs/FRONTEND_CHECKLIST.md | 1 + healthlink-his-ui/src/store/modules/user.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/MD/specs/FRONTEND_CHECKLIST.md b/MD/specs/FRONTEND_CHECKLIST.md index 7b9217694..541b880a5 100755 --- a/MD/specs/FRONTEND_CHECKLIST.md +++ b/MD/specs/FRONTEND_CHECKLIST.md @@ -1,3 +1,4 @@ + # 前端发布前检查清单 > **文档类型**: 技术规范 diff --git a/healthlink-his-ui/src/store/modules/user.js b/healthlink-his-ui/src/store/modules/user.js index 3d78ba00e..e7dadd08d 100755 --- a/healthlink-his-ui/src/store/modules/user.js +++ b/healthlink-his-ui/src/store/modules/user.js @@ -1,4 +1,5 @@ import {getInfo, login, logout} from '@/api/login' +import useTagsViewStore from '@/store/modules/tagsView' import {getToken, removeToken, setToken} from '@/utils/auth' import defAva from '@/assets/images/user.png' import {defineStore} from 'pinia' @@ -84,6 +85,8 @@ const useUserStore = defineStore( this.permissions = [] this.tenantId = '' removeToken() + // 清除标签页内存状态,防止切换账户时残留 + try { useTagsViewStore().delAllViews() } catch(e) {} resolve() }).catch(error => { reject(error)