Browse Source

视频播放1判断

xuqiaoying 3 years ago
parent
commit
7cc104dbd6
2 changed files with 16 additions and 8 deletions
  1. 3 1
      pages3/live/detail.vue
  2. 13 7
      pages3/polyv/detail.vue

+ 3 - 1
pages3/live/detail.vue

@@ -785,7 +785,9 @@ export default {
     // websocket.sendMsg("delAction");
   },
   mounted() {
-    
+    if (this.courseId) {
+      this.originOnMount()
+    }
   },
   methods: {
     ...mapMutations(["updateChapterOpen","updateLiveLast"]),

+ 13 - 7
pages3/polyv/detail.vue

@@ -694,7 +694,6 @@ export default {
     ...mapGetters(["userInfo", "playSectionId", "playChannelId", "playVID"]),
   },
   onLoad(option) {
-    console.log('onLoadonLoadonLoadonLoad')
     this.courseId = Number(option.id) || '';
     this.goodsId = Number(option.goodsId);
     this.orderGoodsId = Number(option.orderGoodsId) || '';
@@ -713,9 +712,13 @@ export default {
     this.courseCourseList();
     this.$store.getters.dictObj;
   },
-  // onShow() {
-  //   console.log('onShowonShowonShowonShow')
-  // },
+  onShow() {
+    console.log('onShowonShowonShowonShow')
+    if (this.courseId) {
+      this.originOnShow()
+    }
+    
+  },
   onUnload() {
     if (this.playSectionId > 0 && this.hasStart) {
       //退出提交记录
@@ -747,9 +750,12 @@ export default {
     uni.removeStorageSync('current')
     // websocket.sendMsg("delAction");
   },
-  // mounted() {
-  //   console.log('mountedmountedmounted')
-  // },
+  mounted() {
+    console.log('mountedmountedmounted')
+    if (this.courseId) {
+      this.originMounted()
+    }
+  },
   methods: {
     ...mapMutations(["updateChapterOpen","updateLiveLast"]),
     // 新增微信公众号模板消息点击数据