diff --git a/src/components/Layout/index.jsx b/src/components/Layout/index.jsx index 996f98e..3331a8d 100644 --- a/src/components/Layout/index.jsx +++ b/src/components/Layout/index.jsx @@ -16,7 +16,9 @@ const Layout = ({ children }) => { const queryLoginStudentInfo = async () => { const res = await getLoginStudentInfo(); - dispatch(setStudentInfo(res)); + if (res.success) { + dispatch(setStudentInfo(res.data)); + } }; // 初始化项目统一获取登录用户信息 diff --git a/src/components/Rank/index.jsx b/src/components/Rank/index.jsx index 1fdf5c0..eaeb98f 100644 --- a/src/components/Rank/index.jsx +++ b/src/components/Rank/index.jsx @@ -1,41 +1,23 @@ import { Avatar } from "@arco-design/web-react"; import "./index.css"; -const Rank = ({ className }) => { +const Rank = ({ className, data }) => { return (

班级排名

+