Просмотр исходного кода

最后视频判断加上课程

谢杰标 2 лет назад
Родитель
Сommit
af9f1a3e0e
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      src/components/courseTree/CourseTree.vue

+ 4 - 2
src/components/courseTree/CourseTree.vue

@@ -1153,10 +1153,12 @@ export default {
     },
     isLastVideo() {
       try {
-        let { sectionId, chapterId } = this.sectionItem;
+        let { sectionId, chapterId, courseId } = this.sectionItem;
         let lastVideo = this.allSectionList.slice(-1)[0];
         return (
-          sectionId == lastVideo.sectionId && chapterId == lastVideo.chapterId
+          sectionId == lastVideo.sectionId &&
+          chapterId == lastVideo.chapterId &&
+          courseId == lastVideo.courseId
         );
       } catch (error) {
         return false;