From 7aca9209f68dc4b7b206a39446b54b2a27ed4772 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期六, 24 五月 2025 12:45:54 +0800
Subject: [PATCH] #移库
---
rsf-admin/src/page/login/Login.jsx | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/rsf-admin/src/page/login/Login.jsx b/rsf-admin/src/page/login/Login.jsx
index 536a6ad..186f09a 100644
--- a/rsf-admin/src/page/login/Login.jsx
+++ b/rsf-admin/src/page/login/Login.jsx
@@ -14,8 +14,10 @@
import {
useTranslate,
useLogin,
+ localStorageStore,
useNotify,
} from 'react-admin';
+import { getSystemDicts } from "@/api/auth";
import { useForm, Controller, useWatch, FormProvider, useFormContext } from "react-hook-form";
import ProviderChoices from "./ProviderChoices";
import Visibility from '@mui/icons-material/Visibility';
@@ -36,7 +38,7 @@
const username = watch('username');
const password = watch('password');
const tenantId = watch('tenantId');
-
+
useEffect(() => {
if (tenantList.length > 0 && !tenantId) {
const rememberTenantId = localStorage.getItem('remember_tenantId');
@@ -49,6 +51,9 @@
}, [tenantList, setValue]);
const onSubmit = (data) => {
+ getSystemDicts().then(data => {
+ localStorage.setItem('sys_dicts', JSON.stringify(data));
+ })
setLoading(true);
login(
data,
--
Gitblit v1.9.1