mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-12-23 18:41:04 +08:00
个人信息修改和切花部门
This commit is contained in:
@@ -19,14 +19,17 @@ const IndexPage = () => {
|
||||
const departments = useSelector(
|
||||
(state: any) => state.loginUser.value.departments
|
||||
);
|
||||
const currentDepId = useSelector(
|
||||
(state: any) => state.loginUser.value.currentDepId
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, [tabKey]);
|
||||
}, [tabKey, currentDepId]);
|
||||
|
||||
const getData = () => {
|
||||
setLoading(true);
|
||||
user.courses(departments[0].id).then((res: any) => {
|
||||
user.courses(currentDepId).then((res: any) => {
|
||||
const records = res.data.learn_course_records;
|
||||
setStats(res.data.stats);
|
||||
setLearnCourseRecords(records);
|
||||
|
||||
Reference in New Issue
Block a user