| applications/drone-command/src/permission.js | ●●●●● patch | view | raw | blame | history | |
| applications/drone-command/src/utils/util.js | ●●●●● patch | view | raw | blame | history |
applications/drone-command/src/permission.js
@@ -118,7 +118,9 @@ if (meta.isAuth === false) { next() } else { logOutFun(next) const { VITE_APP_PARENT_SYSTEM, VITE_APP_ENV } = import.meta.env const isDev = VITE_APP_ENV === 'development' isDev ? next('/login') : window.location.replace(`${VITE_APP_PARENT_SYSTEM}/#/login`) } } }) applications/drone-command/src/utils/util.js
@@ -500,7 +500,7 @@ a = null } // 统一退出登录 export async function logOutFun(next) { export async function logOutFun() { // 延迟导入 store 和 router,避免循环依赖: // auth.js → router → store → user.js → auth.js const { default: store } = await import('@/store') @@ -509,7 +509,7 @@ store.dispatch('LogOut').then(() => { const isDev = VITE_APP_ENV === 'development' if (isDev) { next ? next() : router.push({ path: '/login' }) router.push({ path: '/login' }) setTimeout(() => location.reload()) } else { window.location.replace(`${VITE_APP_PARENT_SYSTEM}/#/login`)