Browse Source

fix:部分手机在播放视频时全屏退出后顶部tabbar不见了的问题

xuqiaoying 3 years ago
parent
commit
c2a744f2a8
3 changed files with 27 additions and 16 deletions
  1. 1 1
      components/course/courseSection.vue
  2. 13 3
      pages3/live/detail.vue
  3. 13 12
      pages3/polyv/detail.vue

+ 1 - 1
components/course/courseSection.vue

@@ -150,7 +150,7 @@ export default {
 		console.log(this.playSectionId,'this.playSectionId')
 		console.log(this.isRebuild)
 		console.log(this.nextMenuItem,'nextMenuItem')
-		console.log(this.menuItem,'this.menuItem')
+		console.log(this.menuItem,'this.menuItem',this.menuItem.liveStartTime, this.nowTime)
 		let moduleId = this.menuItem.moduleId || 0;
 		let chapterId = this.menuItem.chapterId || 0;
 		let sectionId = this.menuItem.sectionId || this.menuItem.menuId;

+ 13 - 3
pages3/live/detail.vue

@@ -1,9 +1,16 @@
 <template>
   <view class="polyv_detail">
-    <nav-bar
+    <uni-nav-bar
+      left-icon="back"
+      :statusBar="true"
+      fixed='true'
+      :title="detail.courseName || '课程详情'"
+      @clickLeft="clickLeft"
+    ></uni-nav-bar>
+    <!-- <nav-bar
       :title="detail.courseName || '课程详情'"
       v-show="navShow"
-    ></nav-bar>
+    ></nav-bar> -->
     <view id="top">
       <view class="video_box" v-if="!startStatus">
         <image
@@ -800,6 +807,9 @@ export default {
   },
   methods: {
     ...mapMutations(["updateChapterOpen","updateLiveLast"]),
+    clickLeft() {
+      uni.navigateBack()
+    },
 		/**
 		 * 获取上次观看的直播
 		 */
@@ -1900,7 +1910,7 @@ export default {
      * 进入全屏
      */
     fullscreenchange(event) {
-      console.log(event);
+      console.log('进入全屏',event);
       if (event.detail.direction == "vertical") {
         this.navShow = true;
       } else if (event.detail.direction == "horizontal") {

+ 13 - 12
pages3/polyv/detail.vue

@@ -1,10 +1,16 @@
 <template>
   <view class="polyv_detail">
-    <nav-bar
+    <!-- <nav-bar
       :title="detail.courseName || '课程详情'"
       v-show="navShow"
-    ></nav-bar>
-    
+    ></nav-bar> -->
+    <uni-nav-bar
+      left-icon="back"
+      :statusBar="true"
+      fixed='true'
+      :title="detail.courseName || '课程详情'"
+      @clickLeft="clickLeft"
+    ></uni-nav-bar>
     <view id="top">
       <view class="video_box" v-if="!startStatus">
         <image
@@ -46,7 +52,6 @@
             :startTime="startTime"
             :enableAutoRotation="enableAutoRotation"
 						@loadedmetadata="loadedmetadata"
-            @controlstoggle="controlstoggle"
           ></polyv-player>
           <cover-view
             class="video-toast__close"
@@ -690,7 +695,7 @@ export default {
 			option:null,
 			isOther:'',
       downLoading: false, //下载讲义加载
-      showMulu: false, //显示和隐藏目录
+      // showMulu: false, //显示和隐藏目录
       muluStyle: false, //显示和隐藏目录样式
       bottomHeight: 0,
     };
@@ -862,6 +867,9 @@ export default {
   },
   methods: {
     ...mapMutations(["updateChapterOpen","updateLiveLast"]),
+    clickLeft() {
+      uni.navigateBack()
+    },
 		markCancel() {
 			uni.navigateBack({
 				delta:1
@@ -2305,16 +2313,9 @@ export default {
       console.log('进入全屏',event);
       if (event.detail.direction == "vertical") {
         this.navShow = true;
-        this.showMulu = false
       } else if (event.detail.direction == "horizontal") {
         this.navShow = false;
-        this.showMulu = true
       }
-      console.log('quanping::', this.showMulu)
-    },
-    controlstoggle(event) {
-      console.log('控制台切换', event)
-      this.showMulu = event.detail.show
     },
     getGoodsDetail() {
       let self = this;