From 7bd32f8351b615c28770be1696b16f0253dc3917 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 07 三月 2025 21:56:11 +0800
Subject: [PATCH] 2025-03-07

---
 src/api/index.js |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/api/index.js b/src/api/index.js
index 2b7208c..83a8993 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -60,10 +60,12 @@
           localStorage.removeItem('role_id')
           localStorage.removeItem('mk_user_type')
 
-          sessionStorage.clear()
-          if (!!(window.history && window.history.pushState)) {
-            window.history.replaceState(null, null, window.location.href.split('#')[0] + '#/login')
-            window.location.reload()
+          if (!/#\/login/.test(window.location.href)) {
+            sessionStorage.clear()
+            if (!!(window.history && window.history.pushState)) {
+              window.history.replaceState(null, null, window.location.href.split('#')[0] + '#/login')
+              window.location.reload()
+            }
           }
         }
       })

--
Gitblit v1.8.0