pull/48/MERGE
xingyu 2024-11-21 14:06:19 +08:00
parent f6c8feeedd
commit 788061adb2
2 changed files with 6 additions and 1 deletions

View File

@ -8,7 +8,7 @@ VITE_APP_NAMESPACE=yudao-vben-antd
VITE_APP_TENANT_ENABLE=true
# 验证码的开关
VITE_APP_CAPTCHA_ENABLE=false
VITE_APP_CAPTCHA_ENABLE=true
# 默认账户密码
VITE_APP_DEFAULT_LOGIN_TENANT=芋道源码

View File

@ -15,9 +15,12 @@ import { getUserInfo, loginApi, logoutApi } from '#/api';
import { $t } from '#/locales';
import { setAccessToken, setRefreshToken } from '#/utils';
import { useDictStore } from './dict';
export const useAuthStore = defineStore('auth', () => {
const accessStore = useAccessStore();
const userStore = useUserStore();
const dictStore = useDictStore();
const router = useRouter();
const loginLoading = ref(false);
@ -61,6 +64,8 @@ export const useAuthStore = defineStore('auth', () => {
: await router.push(userInfo.homePath || DEFAULT_HOME_PATH);
}
dictStore.setDictMap();
if (userInfo?.realName) {
notification.success({
description: `${$t('authentication.loginSuccessDesc')}:${userInfo?.realName}`,