瀏覽代碼

点播锚点

Tang 2 年之前
父節點
當前提交
e4c4107c6f
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      src/pages/course-detail/components/CourseTree.vue

+ 7 - 0
src/pages/course-detail/components/CourseTree.vue

@@ -623,6 +623,13 @@ export default {
       if (this.query.sectionType == 1 && !!this.query.rebuild == this.rebuild) {
         this.toPlay(sectionItem);
       }
+      //生成唯一ID定位Start
+      document.getElementsByClassName('lear-state')[0].setAttribute('id','onlyGif')
+      var a = document.createElement('a')
+      a.setAttribute('href',`#onlyGif`)
+      document.body.appendChild(a)
+      a.click()
+      //生成唯一ID定位End
     },
     activeFunc(courseId, index) {
       let { courseId: nowCourseId, courseList } = this.treeList[index];