Showing
2 changed files
with
17 additions
and
1 deletions
| @@ -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,6 +83,17 @@ export struct BottomNavigationComponent { | @@ -82,6 +83,17 @@ export struct BottomNavigationComponent { | ||
| 82 | autoRefresh: this.autoRefresh | 83 | autoRefresh: this.autoRefresh |
| 83 | }) | 84 | }) |
| 84 | } else { | 85 | } else { |
| 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 { | ||
| 85 | TopNavigationComponent({ | 97 | TopNavigationComponent({ |
| 86 | groupId: navItem.id, | 98 | groupId: navItem.id, |
| 87 | topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073), | 99 | topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073), |
| @@ -92,6 +104,8 @@ export struct BottomNavigationComponent { | @@ -92,6 +104,8 @@ export struct BottomNavigationComponent { | ||
| 92 | autoRefresh: this.autoRefresh | 104 | autoRefresh: this.autoRefresh |
| 93 | }) | 105 | }) |
| 94 | } | 106 | } |
| 107 | + | ||
| 108 | + } | ||
| 95 | } | 109 | } |
| 96 | .tabBar(this.tabBarBuilder(navItem, index)) | 110 | .tabBar(this.tabBarBuilder(navItem, index)) |
| 97 | 111 |
-
Please register or login to post a comment