吉安感知网项目-前端
shuishen
2026-02-03 89380e6260a75d1d3b94de687ebcc2f50d50659d
applications/task-work-order/src/store/modules/user.js
@@ -33,6 +33,7 @@
      token: getStore({ name: 'token' }) || '',
      refreshToken: getStore({ name: 'refreshToken' }) || '',
      parentDeptInfo: getStore({ name: 'parentDeptInfo' }) || '',
      xtToken: getStore({ name: 'xtToken' }) || '',
   },
   actions: {
      //根据用户名登录
@@ -261,9 +262,10 @@
            dispatch('LogOut').then(() => {
               const env = import.meta.env.VITE_APP_ENV
               const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL
               env === 'development'
                  ? (window.location.href = '/task-work-order/login')
                  : window.location.replace(`${adminUrl}#/login`)
               (window.location.href = '/task-work-order/login')
               // env === 'development'
               //    ? (window.location.href = '/task-work-order/login')
               //    : window.location.replace(`${adminUrl}#/login`)
            })
         }
         return new Promise(resolve => {
@@ -297,6 +299,10 @@
      },
   },
   mutations: {
      setXtToken:(state,token) =>{
         state.xtToken = token
         setStore({ name: 'xtToken', content: token })
      },
      SET_PARENT_DEPT_INFO(state, deptId) {
         getParentDeptInfo({ deptId: deptId }).then(res => {
            const data = res.data.data