Merge branch 'dev-v5' of https://gitee.com/yudaocode/yudao-ui-admin-vben into dev-v5
parent
f6c8feeedd
commit
788061adb2
|
@ -8,7 +8,7 @@ VITE_APP_NAMESPACE=yudao-vben-antd
|
||||||
VITE_APP_TENANT_ENABLE=true
|
VITE_APP_TENANT_ENABLE=true
|
||||||
|
|
||||||
# 验证码的开关
|
# 验证码的开关
|
||||||
VITE_APP_CAPTCHA_ENABLE=false
|
VITE_APP_CAPTCHA_ENABLE=true
|
||||||
|
|
||||||
# 默认账户密码
|
# 默认账户密码
|
||||||
VITE_APP_DEFAULT_LOGIN_TENANT=芋道源码
|
VITE_APP_DEFAULT_LOGIN_TENANT=芋道源码
|
||||||
|
|
|
@ -15,9 +15,12 @@ import { getUserInfo, loginApi, logoutApi } from '#/api';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { setAccessToken, setRefreshToken } from '#/utils';
|
import { setAccessToken, setRefreshToken } from '#/utils';
|
||||||
|
|
||||||
|
import { useDictStore } from './dict';
|
||||||
|
|
||||||
export const useAuthStore = defineStore('auth', () => {
|
export const useAuthStore = defineStore('auth', () => {
|
||||||
const accessStore = useAccessStore();
|
const accessStore = useAccessStore();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
const dictStore = useDictStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const loginLoading = ref(false);
|
const loginLoading = ref(false);
|
||||||
|
@ -61,6 +64,8 @@ export const useAuthStore = defineStore('auth', () => {
|
||||||
: await router.push(userInfo.homePath || DEFAULT_HOME_PATH);
|
: await router.push(userInfo.homePath || DEFAULT_HOME_PATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dictStore.setDictMap();
|
||||||
|
|
||||||
if (userInfo?.realName) {
|
if (userInfo?.realName) {
|
||||||
notification.success({
|
notification.success({
|
||||||
description: `${$t('authentication.loginSuccessDesc')}:${userInfo?.realName}`,
|
description: `${$t('authentication.loginSuccessDesc')}:${userInfo?.realName}`,
|
||||||
|
|
Loading…
Reference in New Issue