|
@ -87,6 +87,9 @@ import * as LoginApi from '@/api/login' |
|
|
import { LoginStateEnum, useFormValid, useLoginState } from './useLogin' |
|
|
import { LoginStateEnum, useFormValid, useLoginState } from './useLogin' |
|
|
import { getCodeImg } from "@/api/login"; |
|
|
import { getCodeImg } from "@/api/login"; |
|
|
|
|
|
|
|
|
|
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
|
|
|
import * as DeptApi from '@/api/system/dept' |
|
|
|
|
|
|
|
|
defineOptions({ name: 'LoginForm' }) |
|
|
defineOptions({ name: 'LoginForm' }) |
|
|
|
|
|
|
|
|
const { t } = useI18n() |
|
|
const { t } = useI18n() |
|
@ -212,6 +215,9 @@ const handleLogin = async (params) => { |
|
|
console.log(redirect.value) |
|
|
console.log(redirect.value) |
|
|
push({ path: redirect.value || permissionStore.addRouters[0].path }) |
|
|
push({ path: redirect.value || permissionStore.addRouters[0].path }) |
|
|
} |
|
|
} |
|
|
|
|
|
// 存储 部门信息 |
|
|
|
|
|
const { wsCache } = useCache() |
|
|
|
|
|
wsCache.set(CACHE_KEY.DEPT, await DeptApi.getSimpleDeptList()) |
|
|
} finally { |
|
|
} finally { |
|
|
getCode() |
|
|
getCode() |
|
|
loginLoading.value = false |
|
|
loginLoading.value = false |
|
|