mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-06-29 06:12:46 +08:00
播放张杰视频出现最后一节错误
This commit is contained in:
parent
e08efb1628
commit
3e44cd29eb
@ -37,9 +37,11 @@ const CoursePage = () => {
|
||||
setTotalHours(res.data.hours[0]);
|
||||
} else if (res.data.chapters.length > 0) {
|
||||
const arr: any = [];
|
||||
chapters.map((item: any) => {
|
||||
arr.concat(res.data.hours[item.id]);
|
||||
});
|
||||
for (let key in res.data.hours) {
|
||||
res.data.hours[key].map((item: any) => {
|
||||
arr.push(item);
|
||||
});
|
||||
}
|
||||
setTotalHours(arr);
|
||||
}
|
||||
setLoading(false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user