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

+ 14 - 15
pages3/polyv/detail.vue

@@ -2217,10 +2217,6 @@ export default {
       let photoNum = this.photoNum;
       if (!this.photoConfig) {
         this.photoConfig = true;
-        if (this.erJianErZao) {
-          this.photoList = this.randomConfig(totalVideoTime, duration);
-          return;
-        }
         //没有历史拍照间隔数据
         if (this.photoList.length == 0) {
           if (totalVideoTime >= 900) {
@@ -2279,15 +2275,18 @@ export default {
       }
     },
     // 随机拍摄时间
-    randomConfig(totalVideoTime, duration) {
-      // // #ifdef MP-WEIXIN
-      // let totalVideoTime = polyvPlayerContext.getDuration();
-      // let duration = polyvPlayerContext.getCurrentTime();
-      // // #endif
-      // // #ifdef H5
-      // let totalVideoTime = polyvPlayerContext.j2s_getDuration();
-      // let duration = polyvPlayerContext.j2s_getCurrentTime();
-      // // #endif
+    randomConfigPhoto() {
+      if(this.pauseTime&&Date.now()-this.pauseTime){
+
+      }
+      // #ifdef MP-WEIXIN
+      let totalVideoTime = polyvPlayerContext.getDuration();
+      let duration = polyvPlayerContext.getCurrentTime();
+      // #endif
+      // #ifdef H5
+      let totalVideoTime = polyvPlayerContext.j2s_getDuration();
+      let duration = polyvPlayerContext.j2s_getCurrentTime();
+      // #endif
       this.photoHistoryList = [];
       let photoList = [duration];
       let pre = duration;
@@ -2300,7 +2299,7 @@ export default {
           photoList.push(this.randomNum(totalVideoTime - 180, totalVideoTime));
         }
       }
-      return photoList;
+      this.photoList = photoList;
     },
     getLiveUid(channelId) {
       let self = this;
@@ -2952,7 +2951,7 @@ export default {
         // #ifdef H5
         this.playTime = polyvPlayerContext.j2s_getCurrentTime();
         // #endif
-        !this.erJianErZao ? this.configPhoto() : this.randomConfig();
+        !this.erJianErZao ? this.configPhoto() : this.randomConfigPhoto();
         console.info(this.photoList, "photoList");
         let photoTime = 0; //获取拍照秒数
         for (let i = 0; i < this.photoList.length; i++) {