From 20f9d7b1cedf40ddd94caf6cb2a6f03246668eab Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期六, 08 二月 2025 16:03:25 +0800
Subject: [PATCH] #
---
rsf-admin/src/page/settings/index.jsx | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/rsf-admin/src/page/settings/index.jsx b/rsf-admin/src/page/settings/index.jsx
index 63e48b6..bc2364c 100644
--- a/rsf-admin/src/page/settings/index.jsx
+++ b/rsf-admin/src/page/settings/index.jsx
@@ -21,15 +21,17 @@
import { useWatch, useFormContext } from "react-hook-form";
import { Stack, Grid, Box, Typography, Card, CardContent, Tabs, Tab } from '@mui/material';
import * as Common from '@/utils/common';
-import { } from '@/config/setting';
import BaseSettings from "./BaseSettings";
+import { queryUserInfo } from '@/api/auth';
const Index = () => {
const authProvider = useAuthProvider();
const navigate = useNavigate();
const translate = useTranslate();
const theme = useTheme();
- const [value, setValue] = React.useState(0);
+
+ const [value, setValue] = useState(0);
+ const [userInfo, setUserInfo] = useState(null);
useEffect(() => {
authProvider.checkAuth().catch(() => {
@@ -38,7 +40,10 @@
}, [authProvider, navigate]);
useEffect(() => {
- }, [value]);
+ queryUserInfo().then(res => {
+ setUserInfo(res);
+ })
+ }, []);
return (
<>
@@ -50,7 +55,7 @@
flexGrow: 1,
bgcolor: 'background.paper',
display: 'flex',
- height: 224,
+ // height: 224,
border: `1px solid #${theme[0] === 'light' ? 'ddd' : '333'}`,
borderRadius: 2
}}
@@ -82,6 +87,7 @@
</Tabs>
<BaseSettings
value={value}
+ userInfo={userInfo}
/>
<SecuritySettings
value={value}
--
Gitblit v1.9.1