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}`,