吉安感知网项目-前端
罗广辉
2026-04-01 e884cee3b4caeaa21c9224510ba3f1c63dc0c9ef
feat: 后台管理api调整
3 files modified
26 ■■■■■ changed files
applications/task-work-order/src/axiosXT.js 10 ●●●● patch | view | raw | blame | history
applications/task-work-order/src/permission.js 4 ●●● patch | view | raw | blame | history
applications/task-work-order/src/utils/util.js 12 ●●●● patch | view | raw | blame | history
applications/task-work-order/src/axiosXT.js
@@ -21,10 +21,13 @@
        const { VITE_APP_PARENT_SYSTEM, VITE_APP_ENV } = import.meta.env
        const isDev = VITE_APP_ENV === 'development'
        const urlParams = new URLSearchParams(window.location.search);
        const devLogin = urlParams.get('devLogin');
        isErrorShown = false
        _retry = false
        isDev
        isDev || devLogin
            ? router.push({ path: '/login' })
            : window.location.replace(`${VITE_APP_PARENT_SYSTEM}/#/login`)
    })
@@ -66,10 +69,7 @@
            // 首次报错时提示
            if (!isErrorShown) {
                isErrorShown = true
                ElMessage({
                    message: '用户令牌过期,请重新登录',
                    type: 'error',
                })
                ElMessage.error('用户令牌过期,请重新登录')
            }
            // 清除token信息
            removeToken()
applications/task-work-order/src/permission.js
@@ -117,9 +117,7 @@
    if (meta.isAuth === false) {
      next()
    } else {
            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`)
            logOutFun()
        }
  }
})
applications/task-work-order/src/utils/util.js
@@ -508,13 +508,19 @@
    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 jumpFun = () => {
        const urlParams = new URLSearchParams(window.location.search);
        const devLogin = urlParams.get('devLogin');
        const isDev = VITE_APP_ENV === 'development'
        if (isDev) {
        if (isDev || devLogin) {
            router.push({ path: '/login' })
            setTimeout(() => location.reload())
            // setTimeout(() => location.reload())
        } else {
            window.location.replace(`${VITE_APP_PARENT_SYSTEM}/#/login`)
        }
    }
    store.dispatch('LogOut').then(() => {
        jumpFun()
    })
}