From 930d45addd344baf2c6706d996a50c029f0299d5 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 05 六月 2025 16:33:24 +0800
Subject: [PATCH] 刷新页面

---
 src/layout/components/Navbar.vue |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 3c70204..a8e08a9 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -136,11 +136,16 @@
     currentFatoryId: currentFatoryId
   }
   userStore.loginCheckFactory(loginForm).then(res => {
-    window.location.reload();
+    forceReload();
   }).catch((err) => {
     console.log(err)
   })
 }
+function forceReload() {
+  const currentUrl = window.location.origin + window.location.pathname;
+  const timestamp = new Date().getTime();
+  window.location.href = `${currentUrl}?reload=${timestamp}`;
+}
 
 getUserLoginFacotryList();
 </script>

--
Gitblit v1.9.3