From 4bb904fc27caf0576ed7dbf46d5909a7b1f778c0 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Mon, 14 Jul 2025 09:52:28 +0800
Subject: [PATCH] Merge branch 'test' of http://139.196.74.78:10010/r/drone/drone-web-manage into test

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

diff --git a/src/permission.js b/src/permission.js
index f12dc4e..5272458 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -18,7 +18,7 @@
 NProgress.configure({ showSpinner: false })
 const lockPage = '/lock' //锁屏页
 const urlParams = getUrlParams(window.location.href)
-
+const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL
 function findRouteByPath (routes, targetPath) {
   // 遍历数组中的每个路由对象
   for (const route of routes) {
@@ -93,9 +93,10 @@
     } else {
       const systemToken = store.getters.token || urlParams?.token
       if (systemToken === 0) {
-        store.dispatch('FedLogOut').then(() => {
-          next({ path: '/login' })
-        })
+        // store.dispatch('FedLogOut').then(() => {
+        //   next({ path: '/login' })
+        // })
+        store.dispatch('FedLogOut').then(() =>  window.location.replace(`${adminUrl}#/login`));
       } else {
         const meta = to.meta || {}
         const query = to.query || {}
@@ -120,7 +121,8 @@
     if (meta.isAuth === false) {
       next()
     } else {
-      next('/login')
+      // next('/login')
+      window.location.replace(`${adminUrl}#/login`)
     }
   }
 })

--
Gitblit v1.9.3