chenjun

全屏时底部有块遮罩

@@ -8,7 +8,7 @@ import { @@ -8,7 +8,7 @@ import {
8 postInteractBrowsOperateParams 8 postInteractBrowsOperateParams
9 } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest'; 9 } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
10 import { HttpUtils } from 'wdNetwork/Index'; 10 import { HttpUtils } from 'wdNetwork/Index';
11 -import { DateTimeUtils, Logger, WindowModel } from 'wdKit/Index'; 11 +import { DateTimeUtils, EmitterEventId, EmitterUtils, Logger, WindowModel } from 'wdKit/Index';
12 import { PlayerBottomView } from '../view/PlayerBottomView'; 12 import { PlayerBottomView } from '../view/PlayerBottomView';
13 import { PlayerRightView } from '../view/PlayerRightView'; 13 import { PlayerRightView } from '../view/PlayerRightView';
14 import { DisplayDirection } from 'wdConstant/Index'; 14 import { DisplayDirection } from 'wdConstant/Index';
@@ -512,7 +512,11 @@ export struct DetailPlayShortVideoPage { @@ -512,7 +512,11 @@ export struct DetailPlayShortVideoPage {
512 WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ? 512 WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
513 window.Orientation.PORTRAIT : 513 window.Orientation.PORTRAIT :
514 window.Orientation.LANDSCAPE) 514 window.Orientation.LANDSCAPE)
515 - 515 + if (this.displayDirection === DisplayDirection.VERTICAL) {
  516 + EmitterUtils.sendEvent(EmitterEventId.FULL_SCREEN, 0)
  517 + } else {
  518 + EmitterUtils.sendEvent(EmitterEventId.FULL_SCREEN, 1)
  519 + }
516 520
517 }) 521 })
518 522
@@ -29,7 +29,7 @@ export struct BottomNavigationComponent { @@ -29,7 +29,7 @@ export struct BottomNavigationComponent {
29 @Provide bottomRectHeight: number = 0 29 @Provide bottomRectHeight: number = 0
30 private bottomRectHeight1: string = AppStorage.get<number>('bottomSafeHeight') + 'px'; 30 private bottomRectHeight1: string = AppStorage.get<number>('bottomSafeHeight') + 'px';
31 @Provide topRectHeight: number = 0 31 @Provide topRectHeight: number = 0
32 - @Provide isLayoutFullScreen: boolean = false 32 + @State isLayoutFullScreen: boolean = false
33 @Provide displayDirection: DisplayDirection = DisplayDirection.VERTICAL 33 @Provide displayDirection: DisplayDirection = DisplayDirection.VERTICAL
34 @Provide isImmersive: boolean = false // 是否开启沉浸式模式 http://192.168.1.3:3300/project/3802/interface/api/189229 34 @Provide isImmersive: boolean = false // 是否开启沉浸式模式 http://192.168.1.3:3300/project/3802/interface/api/189229
35 @Provide isNight: boolean = false // 是否开启夜间模式 35 @Provide isNight: boolean = false // 是否开启夜间模式
@@ -72,6 +72,13 @@ export struct BottomNavigationComponent { @@ -72,6 +72,13 @@ export struct BottomNavigationComponent {
72 this.changeBottomNav(assignChannel) 72 this.changeBottomNav(assignChannel)
73 } 73 }
74 }) 74 })
  75 + EmitterUtils.receiveEvent(EmitterEventId.FULL_SCREEN, (str?: string) => {
  76 + Logger.debug(TAG, 'receiveEvent FULL_SCREEN: ' + str)
  77 + if (str) {
  78 + // 跳转指定频道场景,传参底导id、频道id
  79 + this.isLayoutFullScreen = str == '1' ? true : false
  80 + }
  81 + })
75 } 82 }
76 83
77 aboutToDisappear() { 84 aboutToDisappear() {
@@ -120,8 +127,7 @@ export struct BottomNavigationComponent { @@ -120,8 +127,7 @@ export struct BottomNavigationComponent {
120 // 备注:鸿蒙目前只有修改三线导航背景方法,对于全面屏导航条手机需要设置背景色并使其扩散到导航区域 127 // 备注:鸿蒙目前只有修改三线导航背景方法,对于全面屏导航条手机需要设置背景色并使其扩散到导航区域
121 // .backgroundColor(this.barBackgroundColor) 128 // .backgroundColor(this.barBackgroundColor)
122 .layoutWeight(1) 129 .layoutWeight(1)
123 -  
124 - Blank().width('100%').height(this.bottomRectHeight1).backgroundColor(this.barBackgroundColor) 130 + Blank().width('100%').height(this.bottomRectHeight1).backgroundColor(this.barBackgroundColor).visibility(this.isLayoutFullScreen?Visibility.None:Visibility.Visible)
125 }.height('100%').width('100%') 131 }.height('100%').width('100%')
126 } 132 }
127 133