From c62a61cfdba5cf60f59e7e79432150e479155da4 Mon Sep 17 00:00:00 2001
From: xyc <jc_xiong@hotmail.com>
Date: 星期一, 31 八月 2026 09:01:12 +0800
Subject: [PATCH] feat: 关闭标签页/浏览器后强制重新登录——认证信息(token/username/realName/modules)改存 sessionStorage,目录记忆/备注草稿等偏好仍存 localStorage

---
 traffic-audit-web/src/main.js |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/traffic-audit-web/src/main.js b/traffic-audit-web/src/main.js
index 6ff9576..7aea668 100644
--- a/traffic-audit-web/src/main.js
+++ b/traffic-audit-web/src/main.js
@@ -11,10 +11,10 @@
 Vue.mixin({
   methods: {
     logout() {
-      localStorage.removeItem('token')
-      localStorage.removeItem('username')
-      localStorage.removeItem('realName')
-      localStorage.removeItem('modules')
+      sessionStorage.removeItem('token')
+      sessionStorage.removeItem('username')
+      sessionStorage.removeItem('realName')
+      sessionStorage.removeItem('modules')
       this.$router.push('/login')
     }
   }

--
Gitblit v1.9.1