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

---
 src/api/index.js |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/api/index.js b/src/api/index.js
index 33dd7c5..5c7d933 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -48,11 +48,13 @@
         okText: '鐭ラ亾浜�',
         onOk: () => {
           window.GLOB.$error = false
-          
-          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