From b57fdcd6941d41962e05cd7412d2a22bd96a4278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com> Date: Fri, 7 Apr 2023 14:59:29 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E9=97=A8id=E4=B8=BA0=E6=97=B6?= =?UTF-8?q?=E4=B8=8D=E8=AF=B7=E6=B1=82api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index e663732..825dd84 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -36,6 +36,9 @@ const IndexPage = () => { }, [systemConfig]); const getData = () => { + if (currentDepId === 0) { + return; + } setLoading(true); user.courses(currentDepId).then((res: any) => { const records = res.data.learn_course_records;