mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-09-10 23:43:32 +08:00
部门id为0时不请求api
This commit is contained in:
parent
2d22c486d1
commit
b57fdcd694
@ -36,6 +36,9 @@ const IndexPage = () => {
|
|||||||
}, [systemConfig]);
|
}, [systemConfig]);
|
||||||
|
|
||||||
const getData = () => {
|
const getData = () => {
|
||||||
|
if (currentDepId === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
user.courses(currentDepId).then((res: any) => {
|
user.courses(currentDepId).then((res: any) => {
|
||||||
const records = res.data.learn_course_records;
|
const records = res.data.learn_course_records;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user