chenquansheng

fix |> 修复视频频道页面切换横竖屏出现底部tabbar问题

... ... @@ -308,7 +308,7 @@ export struct DetailPlayShortVideoPage {
this.playerHeight = px2vp(height)
this.playerWidth = px2vp(height * this.ratio)
}
//console.log('cj2024 calculatePlayerRect=====', width, height,px2vp(this.windowHeight),this.playerHeight)
// console.log('cj2024 calculatePlayerRect=====', width, height,px2vp(this.windowHeight),this.playerHeight)
}
... ... @@ -544,7 +544,7 @@ export struct DetailPlayShortVideoPage {
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE)
if (this.displayDirection === DisplayDirection.VERTICAL) {
if (this.displayDirection === DisplayDirection.VERTICAL) {//0:转成竖屏,1:转成横屏
EmitterUtils.sendEvent(EmitterEventId.FULL_SCREEN, 0)
} else {
EmitterUtils.sendEvent(EmitterEventId.FULL_SCREEN, 1)
... ...
... ... @@ -71,7 +71,9 @@ export struct BottomNavigationComponent {
EmitterUtils.receiveEvent(EmitterEventId.FULL_SCREEN, (str?: string) => {
Logger.debug(TAG, 'receiveEvent FULL_SCREEN: ' + str)
// 跳转指定频道场景,传参底导id、频道id
this.isLayoutFullScreen = str == '1' ? true : false
setTimeout(()=>{
this.isLayoutFullScreen = str == '1' ? true : false
},200)
})
}
... ... @@ -115,8 +117,7 @@ export struct BottomNavigationComponent {
.zIndex(10)
.scrollable(false)
.animationDuration(0)
.barHeight(this.displayDirection === DisplayDirection.VERTICAL ? $r('app.float.bottom_navigation_barHeight') :
0.001)
.barHeight(this.isLayoutFullScreen ? 0.001 : $r('app.float.bottom_navigation_barHeight'))
.barMode(BarMode.Fixed)
.barBackgroundColor(this.barBackgroundColor)
// 备注:鸿蒙目前只有修改三线导航背景方法,对于全面屏导航条手机需要设置背景色并使其扩散到导航区域
... ... @@ -127,7 +128,7 @@ export struct BottomNavigationComponent {
.height(this.bottomRectHeight1)
.backgroundColor(this.barBackgroundColor)
.visibility(this.isLayoutFullScreen ? Visibility.None : Visibility.Visible)
}.height('100%').width('100%')
}.height('100%').width('100%').backgroundColor(this.barBackgroundColor)
}
@Builder
... ... @@ -152,7 +153,7 @@ export struct BottomNavigationComponent {
.width('100%')
.height($r('app.float.bottom_navigation_barHeight'))
.hoverEffect(HoverEffect.Highlight)
.visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
.visibility(this.isLayoutFullScreen ? Visibility.Hidden : Visibility.Visible)
// .hitTestBehavior(HitTestMode.Block)
.onClick(() => {
// Logger.info(TAG, `onChange, index: ${index}`);
... ...