吉安感知网项目-前端
罗广辉
2026-03-11 de686e032f50bb77ea4b31739acfdeb0445f2743
feat: 退出登录
1 files modified
6 ■■■■ changed files
applications/drone-command/src/utils/util.js 6 ●●●● patch | view | raw | blame | history
applications/drone-command/src/utils/util.js
@@ -500,11 +500,11 @@
    a = null
}
// 统一退出登录
export function logOutFun(next) {
export async function logOutFun(next) {
    // 延迟导入 store 和 router,避免循环依赖:
    // auth.js → router → store → user.js → auth.js
    const store = require('@/store').default
    const router = require('@/router').default
    const { default: store } = await import('@/store')
    const { default: router } = await import('@/router')
    const { VITE_APP_PARENT_SYSTEM, VITE_APP_ENV } = import.meta.env
    store.dispatch('LogOut').then(() => {
        const isDev = VITE_APP_ENV === 'development'