谢杰标 2 gadi atpakaļ
vecāks
revīzija
1c9e96ccec
1 mainītis faili ar 9 papildinājumiem un 49 dzēšanām
  1. 9 49
      pages3/polyv/detail.vue

+ 9 - 49
pages3/polyv/detail.vue

@@ -87,7 +87,7 @@
             <view class="note">正在直播中</view>
             <view class="title">{{ livingItem.sectionName }}</view>
           </view>
-          <view
+          <!-- <view
             v-if="teacherList && teacherList.length > 0"
             class="teacher_names"
           >
@@ -100,7 +100,7 @@
             >
               {{ tea.aliasName }}
             </view>
-          </view>
+          </view> -->
           <view
             class="menuBox onessss"
             v-for="(item, index) in menuList"
@@ -744,6 +744,7 @@ export default {
     },
   },
   async onLoad(option) {
+    console.log("🚀 ~ file: detail.vue:747 ~ onLoad ~ option:", option)
     if (option.isOther) {
       this.showMark = true;
       return;
@@ -822,6 +823,7 @@ export default {
         .then((res) => {
           if (res.data.code == 200) {
             this.courseList = res.data.rows;
+            console.log(this.courseList,789)
             // 科目
             let allItem = [{ subjectId: 0, subjectName: "所有" }];
             let ids = [];
@@ -833,40 +835,14 @@ export default {
               }
             });
             this.subList = [...allItem, ...newArr];
-
+            if(!this.courseId){
+               this.courseId = this.courseList[0].courseId
+            }
             this.originOnShow();
             this.originMounted();
           }
         });
     },
-    // 查询用户最后一次看的录播的信息
-    getUserWatchLast() {
-      this.$http({
-        url: "/study/record/getUserWatchLast",
-        method: "get",
-        data: {
-          orderGoodsId: this.orderGoodsId,
-        },
-      }).then((res) => {
-        if (res.data.code == 200) {
-          this.sectionItem = res.data.data || {};
-          if (res.data.data && Object.keys(res.data.data).length) {
-            //有最后一次看的录播的信息
-            this.courseId = res.data.data.courseId;
-            // console.log('查询用户最后一次看的录播的信息', res.data, this.courseId)
-          } else {
-            this.courseId = this.courseList[0].courseId; // 没有观看记录默认一个课程
-            // this.toggleCourseShow = true
-          }
-        } else {
-          this.courseId = this.courseList[0].courseId; // 没有观看记录默认一个课程
-        }
-        this.originOnShow();
-        this.originMounted();
-        //获取商品双师资模板
-        this.getCourseTeacher(this.courseList);
-      });
-    },
     getCourseTeacher(rows) {
       this.goodsTeacher = [];
       //获取商品双师资模板
@@ -875,6 +851,7 @@ export default {
           goodsId: this.goodsId,
         })
         .then((res1) => {
+          console.log("🚀 ~ file: detail.vue:878 ~ .then ~ res1:", res1)
           if (res1.data.data && res1.data.data.length > 0) {
             //课程老师模板
             let teacherTel = res1.data.data;
@@ -1878,23 +1855,6 @@ export default {
     studyNotice() {
       this.noticeShow = true;
     },
-    //播放笔记视频
-    async playNoteVideo(item) {
-      if (this.timer) {
-        clearInterval(this.timer);
-      }
-      this.vid = item.recordingUrl;
-      // #ifdef MP-WEIXIN
-      if (this.vid) {
-        polyvPlayerContext.changeVid(this.vid);
-      }
-      // #endif
-      this.recordObj = { videoCurrentTime: item.noteSecond };
-      if (this.recordObj.videoCurrentTime) {
-        this.needSeek = true; //需要跳转到播放记录
-      }
-      this.startStatus = true;
-    },
     //正常播放视频
     async playVideo(item) {
       this.sectionItem = item;
@@ -1910,13 +1870,13 @@ export default {
       this.$store.commit("setPlaySectionId", {
         playSectionId: item.sectionId,
       });
+      this.startStatus = true;
       if (this.refPlv) {
         this.refPlv.changeVid({
           vid: item.recordingUrl,
           videoCurrentTime: this.recordObj.videoCurrentTime,
         });
       }
-      this.startStatus = true;
     },
     getRecordLast(sectionItem) {
       let { chapterId, sectionId, courseId, moduleId } = sectionItem;