谢杰标 vor 2 Jahren
Ursprung
Commit
8c0afb4449
1 geänderte Dateien mit 13 neuen und 3 gelöschten Zeilen
  1. 13 3
      pages3/polyv/detail.vue

+ 13 - 3
pages3/polyv/detail.vue

@@ -432,7 +432,6 @@ export default {
     },
   },
   async onLoad(option) {
-    console.log("🚀 ~ file: detail.vue:433 ~ onLoad ~ option:", option);
     if (option.isOther) {
       this.showMark = true;
       return;
@@ -1379,7 +1378,7 @@ export default {
       });
     },
     postStudyRecord(status = 0, sectionId = this.sectionId) {
-      if (!this.refPlv) {
+      if (!this.refPlv && this.playVid) {
         return;
       }
       let currentTime = this.refPlv.playCurrentTime();
@@ -1388,6 +1387,10 @@ export default {
         return;
       }
       let self = this;
+      let fromPlat = 1;
+      // #ifdef H5
+      fromPlat = 3;
+      // #endif
       let data = {
         ...this.params([
           "orderGoodsId",
@@ -1396,7 +1399,7 @@ export default {
           "erJianErZao",
           "gradeId",
         ]),
-        fromPlat: 1, //来源平台 1小程序 2网站
+        fromPlat, //来源平台 1小程序 2网站
         photo: self.ossAvatarUrl,
         sectionId: sectionId || 0,
         studyDuration: parseInt(PlayDuration),
@@ -1495,13 +1498,20 @@ export default {
       }).then((res) => {});
     },
     timeupdate(time) {
+      console.log("🚀 ~ file: detail.vue:1501 ~ timeupdate ~ time:", time);
       if (this.noticeShow) {
         this.refPlv.playPause();
         return;
       }
+      newRecord(time);
       this.playTime = time;
       this.timeEvent(time);
     },
+    newRecord(time) {
+      return debounce(() => {
+        console.log(1123123, time);
+      }, 5000);
+    },
     playing() {
       console.log("palying");
       this.isPlaying = true;