From 788061adb2ee598e6b83b28bd4251a964e713abc Mon Sep 17 00:00:00 2001 From: xingyu Date: Thu, 21 Nov 2024 14:06:19 +0800 Subject: [PATCH] Merge branch 'dev-v5' of https://gitee.com/yudaocode/yudao-ui-admin-vben into dev-v5 --- apps/web-antd/.env | 2 +- apps/web-antd/src/store/auth.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/web-antd/.env b/apps/web-antd/.env index 975ea83c..f419c96a 100644 --- a/apps/web-antd/.env +++ b/apps/web-antd/.env @@ -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=芋道源码 diff --git a/apps/web-antd/src/store/auth.ts b/apps/web-antd/src/store/auth.ts index 3d163e17..f90bac07 100644 --- a/apps/web-antd/src/store/auth.ts +++ b/apps/web-antd/src/store/auth.ts @@ -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}`,