xuqiaoying vor 2 Jahren
Ursprung
Commit
f446e28c4f
2 geänderte Dateien mit 16 neuen und 12 gelöschten Zeilen
  1. 7 7
      pages/index/index.vue
  2. 9 5
      pages3/polyv/detail.vue

+ 7 - 7
pages/index/index.vue

@@ -341,13 +341,13 @@ export default {
 		} else {
 			console.log('没有code', uni.getStorageSync('h5_code'));
 			// 没有code,就重定向到地址https://www.xyyxt.net?ask_type=h.xyyxt.net 去获取code,授权后就会把code带上然后访问域名,就拿到code了
-			if (!uni.getStorageSync('h5_code')) {
-				location.replace('https://www.xyyxt.net/?ask_type=h.xyyxt.net')
-				return
-			} else {
-				this.$set(this.optObj, 'code', uni.getStorageSync('h5_code'))
-				this.OfficialLogin()
-			}
+			// if (!uni.getStorageSync('h5_code')) {
+			// 	location.replace('https://www.xyyxt.net/?ask_type=h.xyyxt.net')
+			// 	return
+			// } else {
+			// 	this.$set(this.optObj, 'code', uni.getStorageSync('h5_code'))
+			// 	this.OfficialLogin()
+			// }
 		}
 		// #endif
 		this.getInfo() // 判断有没有关注公众号		

+ 9 - 5
pages3/polyv/detail.vue

@@ -1431,8 +1431,8 @@ export default {
           this.CountTo = -1
           console.log('this.goodsPlayConfig', this.goodsPlayConfig, polyvPlayerContext);
           if (this.goodsPlayConfig && this.goodsPlayConfig.autoPlay > 0) {
-            this.autoplay = true
             // #ifdef MP-WEIXIN
+            this.autoplay = true
             var polyvPlayerContext = this.selectComponent("#playerVideo")
             polyvPlayerContext.play()
             // #endif
@@ -3186,15 +3186,18 @@ export default {
         this.getNoteList();
         if (self.goodsData.goodsPlayConfig) {
           self.goodsPlayConfig = JSON.parse(self.goodsData.goodsPlayConfig);
-          // if (self.goodsPlayConfig.autoPlay > 0) {
-          //   self.autoplay = true;
-          // }
+          if (self.goodsPlayConfig.autoPlay > 0) {
+            // #ifdef H5
+            self.autoplay = true;
+            console.log('是否自动播放:', self.autoplay);
+            // #endif
+          }
           if (self.goodsPlayConfig.drag > 0) {
             // #ifdef MP-WEIXIN
             self.isAllowSeek = "yes";
             // #endif
             // #ifdef H5
-            this.H5isAllowSeek = 'on'
+            this.H5isAllowSeek = 'off'
             // #endif
           }
           if (self.goodsPlayConfig.speed > 0) {
@@ -3492,6 +3495,7 @@ export default {
         })
 
         this.player.on("s2j_onPlayOver", () => { // 当前视频播放完毕时触发
+        console.log('结束了结束了');
           this.hasStart = false
           clearInterval(this.studyTimer)
           clearInterval(this.timer)