From d47f1a9250672d8edd3a107f5c741951c040f644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com> Date: Wed, 14 Jun 2023 17:30:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E8=AF=A6=E6=83=85=E8=AF=BE?= =?UTF-8?q?=E6=97=B6=E5=8A=A0=E8=BD=BD=E9=94=99=E8=AF=AF=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/course/index.tsx | 56 ++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/src/pages/course/index.tsx b/src/pages/course/index.tsx index dac59ec..715bfb4 100644 --- a/src/pages/course/index.tsx +++ b/src/pages/course/index.tsx @@ -173,33 +173,35 @@ const CoursePage = () => { {chapters.map((item: any, index: number) => (
{item.name}
- {hours[item.id].map((it: any, int: number) => ( -
- {learnHourRecord[it.id] && ( - - )} - {!learnHourRecord[it.id] && ( - - )} -
- ))} + {hours[item.id] && + hours[item.id].map((it: any, int: number) => ( +
+ {learnHourRecord[it.id] && ( + + )} + {!learnHourRecord[it.id] && ( + + )} +
+ ))}
))}