|
@@ -125,7 +125,7 @@ export default defineComponent({
|
|
|
const res = await request.get(
|
|
|
`${state.platformApi}/courseSchedule/detail/${route.query.courseId}`
|
|
|
)
|
|
|
- if (res?.data){
|
|
|
+ if (res?.data) {
|
|
|
data.isCourse = res.data.status === 'COMPLETE' ? false : true
|
|
|
}
|
|
|
} catch (e) {
|
|
@@ -171,6 +171,7 @@ export default defineComponent({
|
|
|
...videoItem,
|
|
|
iframeRef: null,
|
|
|
tabName: item.name,
|
|
|
+ isLast: j === itemLength, // 当前知识点
|
|
|
autoPlay: j === itemLength
|
|
|
})
|
|
|
}
|
|
@@ -354,17 +355,20 @@ export default defineComponent({
|
|
|
//当前视频播放完
|
|
|
const handleEnded = (m: any) => {
|
|
|
// console.log(m)
|
|
|
- // 自动播放下一个知识点
|
|
|
- if (m.autoPlay) {
|
|
|
- if (popupData.activeIndex != data.itemList.length - 1) {
|
|
|
- popupData.activeIndex++
|
|
|
- swipeRef.value?.next()
|
|
|
- const nextItem = data.itemList[popupData.activeIndex]
|
|
|
+ if (popupData.activeIndex != data.itemList.length - 1) {
|
|
|
+ popupData.activeIndex++
|
|
|
+ swipeRef.value?.next()
|
|
|
+ const nextItem = data.itemList[popupData.activeIndex]
|
|
|
+ if (nextItem.type === 'VIDEO'){
|
|
|
nextTick(() => {
|
|
|
+ // 自动播放下一个知识点
|
|
|
+ // if (m.autoPlay) {
|
|
|
+ // }
|
|
|
nextItem.videoEle?.play()
|
|
|
})
|
|
|
- console.log('🚀 ~ nextItem', nextItem)
|
|
|
}
|
|
|
+
|
|
|
+ console.log('🚀 ~ nextItem', nextItem)
|
|
|
}
|
|
|
}
|
|
|
|