zhenghy

视频频道页改成沉浸式

@@ -77,32 +77,30 @@ export struct BottomNavigationComponent { @@ -77,32 +77,30 @@ export struct BottomNavigationComponent {
77 Tabs({ barPosition: BarPosition.End, index: this.currentNavIndex, controller: this.navController }) { 77 Tabs({ barPosition: BarPosition.End, index: this.currentNavIndex, controller: this.navController }) {
78 ForEach(this.bottomNavList, (navItem: BottomNavDTO, index: number) => { 78 ForEach(this.bottomNavList, (navItem: BottomNavDTO, index: number) => {
79 TabContent() { 79 TabContent() {
80 - Column() {  
81 - if (CompUtils.isMine(navItem)) {  
82 - // 我的页面组件数据列表  
83 - MinePageComponent()  
84 - } else if (navItem.name === '视频') {  
85 - // 视频频道,包含视频和直播  
86 - VideoChannelPage({  
87 - topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073),  
88 - _currentNavIndex: $currentNavIndex,  
89 - })  
90 - } else {  
91 - TopNavigationComponent({  
92 - groupId: navItem.id,  
93 - topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073),  
94 - _currentNavIndex: $currentNavIndex,  
95 - navIndex: index,  
96 - currentBottomNavName: navItem.name,  
97 - assignChannel: this.assignChannel,  
98 - autoRefresh: this.autoRefresh  
99 - })  
100 - }  
101 - 80 + if (CompUtils.isMine(navItem)) {
  81 + // 我的页面组件数据列表
  82 + MinePageComponent()
  83 + } else if (navItem.name === '视频') {
  84 + // 视频频道,包含视频和直播
  85 + VideoChannelPage({
  86 + topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073),
  87 + _currentNavIndex: $currentNavIndex,
  88 + })
  89 + } else {
  90 + TopNavigationComponent({
  91 + groupId: navItem.id,
  92 + topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073),
  93 + _currentNavIndex: $currentNavIndex,
  94 + navIndex: index,
  95 + currentBottomNavName: navItem.name,
  96 + assignChannel: this.assignChannel,
  97 + autoRefresh: this.autoRefresh
  98 + })
102 } 99 }
103 } 100 }
104 .tabBar(this.tabBarBuilder(navItem, index)) 101 .tabBar(this.tabBarBuilder(navItem, index))
105 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) 102 +
  103 + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
106 }); 104 });
107 105
108 } 106 }
@@ -113,7 +111,7 @@ export struct BottomNavigationComponent { @@ -113,7 +111,7 @@ export struct BottomNavigationComponent {
113 .barBackgroundColor(this.barBackgroundColor) 111 .barBackgroundColor(this.barBackgroundColor)
114 // 备注:鸿蒙目前只有修改三线导航背景方法,对于全面屏导航条手机需要设置背景色并使其扩散到导航区域 112 // 备注:鸿蒙目前只有修改三线导航背景方法,对于全面屏导航条手机需要设置背景色并使其扩散到导航区域
115 .backgroundColor(this.barBackgroundColor) 113 .backgroundColor(this.barBackgroundColor)
116 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) 114 + .expandSafeArea([SafeAreaType.SYSTEM])
117 115
118 // .padding({ bottom: this.bottomRectHeight + 'px', top: this.topRectHeight + 'px' }) // 此处margin具体数值在实际中应与导航条区域高度保持一致 116 // .padding({ bottom: this.bottomRectHeight + 'px', top: this.topRectHeight + 'px' }) // 此处margin具体数值在实际中应与导航条区域高度保持一致
119 117
@@ -61,6 +61,7 @@ export struct VideoChannelPage { @@ -61,6 +61,7 @@ export struct VideoChannelPage {
61 .width('100%') 61 .width('100%')
62 .height('100%') 62 .height('100%')
63 .align(Alignment.Top) 63 .align(Alignment.Top)
  64 + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
64 } 65 }
65 66
66 @Builder 67 @Builder
@@ -133,6 +134,7 @@ export struct VideoChannelPage { @@ -133,6 +134,7 @@ export struct VideoChannelPage {
133 .cachedCount(3) 134 .cachedCount(3)
134 .displayCount(1, true) 135 .displayCount(1, true)
135 .alignSelf(ItemAlign.Start) 136 .alignSelf(ItemAlign.Start)
  137 + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
136 .onChange((index: number) => { 138 .onChange((index: number) => {
137 this.currentTopNavSelectedIndex = index 139 this.currentTopNavSelectedIndex = index
138 }) 140 })