|
|
@ -5,6 +5,7 @@ import {courseApi} from "@/api"; |
|
|
|
import VideoCover from "@/components/videoCover/videoCover"; |
|
|
|
import VideoCover from "@/components/videoCover/videoCover"; |
|
|
|
import {formatMinute} from "@/utils/time"; |
|
|
|
import {formatMinute} from "@/utils/time"; |
|
|
|
import Empty from "@/components/empty/empty"; |
|
|
|
import Empty from "@/components/empty/empty"; |
|
|
|
|
|
|
|
import eventsIndex from "@/hooks/eventsIndex"; |
|
|
|
|
|
|
|
|
|
|
|
const CourType: FC = () => { |
|
|
|
const CourType: FC = () => { |
|
|
|
const params = useRouter().params |
|
|
|
const params = useRouter().params |
|
|
@ -45,6 +46,16 @@ const CourType: FC = () => { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
eventsIndex.on(({id}) => { |
|
|
|
|
|
|
|
if (id == null && params.type === "4") return; |
|
|
|
|
|
|
|
for (const [index, notFinished] of data.entries()) { |
|
|
|
|
|
|
|
if (notFinished.id === id) { |
|
|
|
|
|
|
|
data.splice(index, 1) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
getData() |
|
|
|
getData() |
|
|
|