chenquansheng

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

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