| | |
| | | import { setToken, setRefreshToken, removeToken, removeRefreshToken, getRefreshToken } from '@/utils/auth' |
| | | import { setStore, getStore } from '@/utils/store' |
| | | import { validatenull } from '@/utils/validate' |
| | | import { deepClone } from '@/utils/util' |
| | | import { deepClone, logOutFun } from '@/utils/util' |
| | | import defaultAva from '@/assets/images/defaultava.png' |
| | | import { |
| | | loginByUsername, |
| | |
| | | }, |
| | | GetMenu({ commit, dispatch }, tenantId) { |
| | | const errLogOut = () => { |
| | | dispatch('LogOut').then(() => { |
| | | const env = import.meta.env.VITE_APP_ENV |
| | | const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL |
| | | (window.location.href = '/task-work-order/login') |
| | | // env === 'development' |
| | | // ? (window.location.href = '/task-work-order/login') |
| | | // : window.location.replace(`${adminUrl}#/login`) |
| | | }) |
| | | logOutFun() |
| | | } |
| | | return new Promise(resolve => { |
| | | getRoutes({ tenantId, sysType: 6 }) |