Showing
3 changed files
with
25 additions
and
11 deletions
| @@ -122,4 +122,6 @@ export class WDRouterPage { | @@ -122,4 +122,6 @@ export class WDRouterPage { | ||
| 122 | static reserveMorePage = new WDRouterPage("wdComponent", "ets/components/page/ReserveMorePage"); | 122 | static reserveMorePage = new WDRouterPage("wdComponent", "ets/components/page/ReserveMorePage"); |
| 123 | //金刚位聚合页 | 123 | //金刚位聚合页 |
| 124 | static themeListPage = new WDRouterPage("wdComponent", "ets/components/page/ThemeListPage"); | 124 | static themeListPage = new WDRouterPage("wdComponent", "ets/components/page/ThemeListPage"); |
| 125 | + // 栏目页面、频道详情 | ||
| 126 | + static columnPage = new WDRouterPage("phone", "ets/pages/column/ColumnPage"); | ||
| 125 | } | 127 | } |
| 1 | -import { PageComponent } from './PageComponent'; | 1 | +import { PageComponent } from 'wdComponent/Index'; |
| 2 | +import { HashMap } from '@kit.ArkTS'; | ||
| 3 | +import { router } from '@kit.ArkUI'; | ||
| 4 | +import { AssignChannelParam } from 'wdRouter/src/main/ets/utils/HomeChannelUtils'; | ||
| 2 | 5 | ||
| 3 | -const TAG = 'ColumnPageComponent'; | 6 | +const TAG = 'ColumnPage'; |
| 4 | 7 | ||
| 5 | /** | 8 | /** |
| 6 | * 二级栏目页面,展排数据 | 9 | * 二级栏目页面,展排数据 |
| 7 | */ | 10 | */ |
| 11 | +@Entry | ||
| 8 | @Component | 12 | @Component |
| 9 | -export struct ColumnPageComponent { | 13 | +export struct ColumnPage { |
| 10 | @State currentTopNavSelectedIndex: number = 0; | 14 | @State currentTopNavSelectedIndex: number = 0; |
| 15 | + @State param: AssignChannelParam = router.getParams() as AssignChannelParam | ||
| 11 | pageId: string = ""; | 16 | pageId: string = ""; |
| 12 | channelId: string = ""; | 17 | channelId: string = ""; |
| 13 | 18 | ||
| 14 | - build() { | ||
| 15 | - PageComponent({ | ||
| 16 | - currentTopNavSelectedIndex: $currentTopNavSelectedIndex, | ||
| 17 | - navIndex: this.currentTopNavSelectedIndex, | ||
| 18 | - pageId: this.pageId, | ||
| 19 | - channelId: this.channelId, | ||
| 20 | - }); | 19 | + aboutToAppear() { |
| 20 | + this.pageId = this.param.pageId | ||
| 21 | + this.channelId = this.param.channelId | ||
| 22 | + } | ||
| 21 | 23 | ||
| 24 | + build() { | ||
| 25 | + Column() { | ||
| 26 | + PageComponent({ | ||
| 27 | + currentTopNavSelectedIndex: $currentTopNavSelectedIndex, | ||
| 28 | + navIndex: this.currentTopNavSelectedIndex, | ||
| 29 | + pageId: this.pageId, | ||
| 30 | + channelId: this.channelId, | ||
| 31 | + }); | ||
| 32 | + } | ||
| 22 | } | 33 | } |
| 23 | } | 34 | } |
| 24 | 35 |
| @@ -13,6 +13,7 @@ | @@ -13,6 +13,7 @@ | ||
| 13 | "pages/launchPage/LaunchAdvertisingPage", | 13 | "pages/launchPage/LaunchAdvertisingPage", |
| 14 | "pages/broadcast/BroadcastPage", | 14 | "pages/broadcast/BroadcastPage", |
| 15 | "pages/launchPage/LaunchInterestsHobbiesPage", | 15 | "pages/launchPage/LaunchInterestsHobbiesPage", |
| 16 | - "pages/SpacialTopicPage" | 16 | + "pages/SpacialTopicPage", |
| 17 | + "pages/column/ColumnPage" | ||
| 17 | ] | 18 | ] |
| 18 | } | 19 | } |
-
Please register or login to post a comment