feat: 🎸 更新了一部分接口请求信息
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import * as echarts from "echarts";
|
||||
import { useState, useEffect } from "react";
|
||||
import { useSelector } from "react-redux";
|
||||
import StudyProgress from "../StudyProgress";
|
||||
import ScoreRingChart from "../ScoreRingChart";
|
||||
import AttendanceRingChart from "../AttendanceRingChart";
|
||||
import { getLoginStudentProgress } from "@/services";
|
||||
import "./index.css";
|
||||
|
||||
const ringData = [
|
||||
@@ -49,6 +52,21 @@ const attendanceData = [
|
||||
];
|
||||
|
||||
const StudyStudes = () => {
|
||||
const studentInfo = useSelector((state) => state.student.studentInfo);
|
||||
|
||||
const [progressData, setProgressData] = useState({});
|
||||
|
||||
const queryLoginStudentProgress = async () => {
|
||||
const res = await getLoginStudentProgress();
|
||||
if (res.success) {
|
||||
setProgressData(res.data);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
queryLoginStudentProgress();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="study-studes-card-wrapper">
|
||||
<p className="study-studes-card-title">学习情况</p>
|
||||
|
||||
Reference in New Issue
Block a user