skyouc
2025-04-15 e80184f5d053bff9d0f7fdaade6c800bee84c7dd
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,