Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main
* 'main' of http://192.168.1.42/developOne/harmonyPool: fix |> 修复视频频道页面切换横竖屏出现底部tabbar问题
Showing
2 changed files
with
8 additions
and
7 deletions
| @@ -318,7 +318,7 @@ export struct DetailPlayShortVideoPage { | @@ -318,7 +318,7 @@ export struct DetailPlayShortVideoPage { | ||
| 318 | this.playerHeight = px2vp(height) | 318 | this.playerHeight = px2vp(height) |
| 319 | this.playerWidth = px2vp(height * this.ratio) | 319 | this.playerWidth = px2vp(height * this.ratio) |
| 320 | } | 320 | } |
| 321 | - //console.log('cj2024 calculatePlayerRect=====', width, height,px2vp(this.windowHeight),this.playerHeight) | 321 | + // console.log('cj2024 calculatePlayerRect=====', width, height,px2vp(this.windowHeight),this.playerHeight) |
| 322 | 322 | ||
| 323 | } | 323 | } |
| 324 | 324 | ||
| @@ -558,7 +558,7 @@ export struct DetailPlayShortVideoPage { | @@ -558,7 +558,7 @@ export struct DetailPlayShortVideoPage { | ||
| 558 | WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ? | 558 | WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ? |
| 559 | window.Orientation.PORTRAIT : | 559 | window.Orientation.PORTRAIT : |
| 560 | window.Orientation.LANDSCAPE) | 560 | window.Orientation.LANDSCAPE) |
| 561 | - if (this.displayDirection === DisplayDirection.VERTICAL) { | 561 | + if (this.displayDirection === DisplayDirection.VERTICAL) {//0:转成竖屏,1:转成横屏 |
| 562 | EmitterUtils.sendEvent(EmitterEventId.FULL_SCREEN, 0) | 562 | EmitterUtils.sendEvent(EmitterEventId.FULL_SCREEN, 0) |
| 563 | } else { | 563 | } else { |
| 564 | EmitterUtils.sendEvent(EmitterEventId.FULL_SCREEN, 1) | 564 | 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}`); |
-
Please register or login to post a comment