zhangbo1_wd

添加重构顶导入口,添加开关

@@ -16,6 +16,8 @@ export { LikeComponent } from "./src/main/ets/components/view/LikeComponent" @@ -16,6 +16,8 @@ export { LikeComponent } from "./src/main/ets/components/view/LikeComponent"
16 16
17 export { TopNavigationComponent } from "./src/main/ets/components/page/TopNavigationComponent" 17 export { TopNavigationComponent } from "./src/main/ets/components/page/TopNavigationComponent"
18 18
  19 +export { TopNavigationComponentNew } from "./src/main/ets/components/page/TopNavigationComponentNew"
  20 +
19 export { LabelComponent } from "./src/main/ets/components/view/LabelComponent" 21 export { LabelComponent } from "./src/main/ets/components/view/LabelComponent"
20 22
21 export { BannerComponent } from "./src/main/ets/components/view/BannerComponent" 23 export { BannerComponent } from "./src/main/ets/components/view/BannerComponent"
@@ -4,7 +4,7 @@ import { EmitterEventId, EmitterUtils, Logger, StringUtils } from 'wdKit'; @@ -4,7 +4,7 @@ import { EmitterEventId, EmitterUtils, Logger, StringUtils } from 'wdKit';
4 import { HttpUtils } from 'wdNetwork/Index'; 4 import { HttpUtils } from 'wdNetwork/Index';
5 import HomeChannelUtils, { AssignChannelParam } from 'wdRouter/Index'; 5 import HomeChannelUtils, { AssignChannelParam } from 'wdRouter/Index';
6 import { MinePageComponent } from 'wdComponent/src/main/ets/components/page/MinePageComponent'; 6 import { MinePageComponent } from 'wdComponent/src/main/ets/components/page/MinePageComponent';
7 -import { CompUtils, TopNavigationComponent } from 'wdComponent/Index'; 7 +import { CompUtils, TopNavigationComponent, TopNavigationComponentNew } from 'wdComponent/Index';
8 import { VideoChannelPage } from './VideoChannelPage'; 8 import { VideoChannelPage } from './VideoChannelPage';
9 import ChannelViewModel from 'wdComponent/src/main/ets/viewmodel/ChannelViewModel'; 9 import ChannelViewModel from 'wdComponent/src/main/ets/viewmodel/ChannelViewModel';
10 10
@@ -17,6 +17,7 @@ let storage = LocalStorage.getShared(); @@ -17,6 +17,7 @@ let storage = LocalStorage.getShared();
17 @Entry(storage) 17 @Entry(storage)
18 @Component 18 @Component
19 export struct BottomNavigationComponent { 19 export struct BottomNavigationComponent {
  20 + private isNewTopPage = true // TODO 顶导重构页面开关,false,则用原来的顶导
20 @Provide bottomRectHeight: number = 0 21 @Provide bottomRectHeight: number = 0
21 @Provide topRectHeight: number = 0 22 @Provide topRectHeight: number = 0
22 @Provide isLayoutFullScreen: boolean = false 23 @Provide isLayoutFullScreen: boolean = false
@@ -82,15 +83,28 @@ export struct BottomNavigationComponent { @@ -82,15 +83,28 @@ export struct BottomNavigationComponent {
82 autoRefresh: this.autoRefresh 83 autoRefresh: this.autoRefresh
83 }) 84 })
84 } else { 85 } else {
85 - TopNavigationComponent({  
86 - groupId: navItem.id,  
87 - topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073),  
88 - _currentNavIndex: $currentNavIndex,  
89 - navIndex: index,  
90 - currentBottomNavName: navItem.name,  
91 - assignChannel: this.assignChannel,  
92 - autoRefresh: this.autoRefresh  
93 - }) 86 + if (this.isNewTopPage) {
  87 + TopNavigationComponentNew({
  88 + groupId: navItem.id,
  89 + topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073),
  90 + _currentNavIndex: $currentNavIndex,
  91 + bottomNavIndex: index,
  92 + currentBottomNavName: navItem.name,
  93 + assignChannel: this.assignChannel,
  94 + autoRefresh: this.autoRefresh
  95 + })
  96 + } else {
  97 + TopNavigationComponent({
  98 + groupId: navItem.id,
  99 + topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073),
  100 + _currentNavIndex: $currentNavIndex,
  101 + navIndex: index,
  102 + currentBottomNavName: navItem.name,
  103 + assignChannel: this.assignChannel,
  104 + autoRefresh: this.autoRefresh
  105 + })
  106 + }
  107 +
94 } 108 }
95 } 109 }
96 .tabBar(this.tabBarBuilder(navItem, index)) 110 .tabBar(this.tabBarBuilder(navItem, index))