Showing
7 changed files
with
13 additions
and
28 deletions
| @@ -70,9 +70,7 @@ export struct ZhSingleRow02 { | @@ -70,9 +70,7 @@ export struct ZhSingleRow02 { | ||
| 70 | .height(14) | 70 | .height(14) |
| 71 | .onClick(() => { | 71 | .onClick(() => { |
| 72 | // TODO 跳转的页面,定义的入参可能不合理。推荐id: 41 | 72 | // TODO 跳转的页面,定义的入参可能不合理。推荐id: 41 |
| 73 | - let params: Params = { | ||
| 74 | - pageID: "1" | ||
| 75 | - } | 73 | + let params = {'index': "1"} as Record<string, string> |
| 76 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params) | 74 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params) |
| 77 | }) | 75 | }) |
| 78 | } | 76 | } |
| @@ -80,9 +78,7 @@ export struct ZhSingleRow02 { | @@ -80,9 +78,7 @@ export struct ZhSingleRow02 { | ||
| 80 | right: $r('app.float.card_comp_pagePadding_lf'), | 78 | right: $r('app.float.card_comp_pagePadding_lf'), |
| 81 | }) | 79 | }) |
| 82 | .onClick(() => { | 80 | .onClick(() => { |
| 83 | - let params: Params = { | ||
| 84 | - pageID: "1" | ||
| 85 | - } | 81 | + let params = {'index': "1"} as Record<string, string>; |
| 86 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params) | 82 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params) |
| 87 | }) | 83 | }) |
| 88 | } | 84 | } |
| @@ -83,9 +83,7 @@ export struct ZhSingleRow05 { | @@ -83,9 +83,7 @@ export struct ZhSingleRow05 { | ||
| 83 | .height(14) | 83 | .height(14) |
| 84 | .onClick(() => { | 84 | .onClick(() => { |
| 85 | // TODO 跳转的页面,定义的入参可能不合理。推荐id: 41 | 85 | // TODO 跳转的页面,定义的入参可能不合理。推荐id: 41 |
| 86 | - let params: Params = { | ||
| 87 | - pageID: "1" | ||
| 88 | - } | 86 | + let params = {'index': "1"} as Record<string, string>; |
| 89 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params) | 87 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params) |
| 90 | }) | 88 | }) |
| 91 | } | 89 | } |
| @@ -89,9 +89,7 @@ export struct HomePageBottomComponent{ | @@ -89,9 +89,7 @@ export struct HomePageBottomComponent{ | ||
| 89 | .backgroundColor($r('app.color.color_F5F5F5')) | 89 | .backgroundColor($r('app.color.color_F5F5F5')) |
| 90 | .margin({top:'31lpx',bottom:'4lpx'}) | 90 | .margin({top:'31lpx',bottom:'4lpx'}) |
| 91 | .onClick(()=>{ | 91 | .onClick(()=>{ |
| 92 | - let params: Params = { | ||
| 93 | - pageID: "1" | ||
| 94 | - } | 92 | + let params = {'index': "1"} as Record<string, string> |
| 95 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params) | 93 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params) |
| 96 | }) | 94 | }) |
| 97 | 95 | ||
| @@ -128,9 +126,7 @@ export struct HomePageBottomComponent{ | @@ -128,9 +126,7 @@ export struct HomePageBottomComponent{ | ||
| 128 | .backgroundColor($r('app.color.color_F5F5F5')) | 126 | .backgroundColor($r('app.color.color_F5F5F5')) |
| 129 | .margin({top:'31lpx',bottom:'4lpx'}) | 127 | .margin({top:'31lpx',bottom:'4lpx'}) |
| 130 | }.onClick(()=>{ | 128 | }.onClick(()=>{ |
| 131 | - let params: Params = { | ||
| 132 | - pageID: "1" | ||
| 133 | - } | 129 | + let params = {'index': "1"} as Record<string, string> |
| 134 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params) | 130 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params) |
| 135 | }) | 131 | }) |
| 136 | 132 |
| @@ -51,9 +51,7 @@ export struct OtherHomePageBottomFollowComponent{ | @@ -51,9 +51,7 @@ export struct OtherHomePageBottomFollowComponent{ | ||
| 51 | .backgroundColor($r('app.color.color_F5F5F5')) | 51 | .backgroundColor($r('app.color.color_F5F5F5')) |
| 52 | .margin({top:'31lpx',bottom:'4lpx'}) | 52 | .margin({top:'31lpx',bottom:'4lpx'}) |
| 53 | .onClick(()=>{ | 53 | .onClick(()=>{ |
| 54 | - let params: Params = { | ||
| 55 | - pageID: "1" | ||
| 56 | - } | 54 | + let params = {'index': "1"} as Record<string, string> |
| 57 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params) | 55 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params) |
| 58 | }) | 56 | }) |
| 59 | 57 | ||
| @@ -85,9 +83,7 @@ export struct OtherHomePageBottomFollowComponent{ | @@ -85,9 +83,7 @@ export struct OtherHomePageBottomFollowComponent{ | ||
| 85 | .backgroundColor($r('app.color.color_F5F5F5')) | 83 | .backgroundColor($r('app.color.color_F5F5F5')) |
| 86 | .margin({top:'31lpx',bottom:'4lpx'}) | 84 | .margin({top:'31lpx',bottom:'4lpx'}) |
| 87 | }.onClick(()=>{ | 85 | }.onClick(()=>{ |
| 88 | - let params: Params = { | ||
| 89 | - pageID: "1" | ||
| 90 | - } | 86 | + let params = {'index': "1"} as Record<string, string>; |
| 91 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params) | 87 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params) |
| 92 | }) | 88 | }) |
| 93 | 89 |
| @@ -5,11 +5,11 @@ import router from '@ohos.router'; | @@ -5,11 +5,11 @@ import router from '@ohos.router'; | ||
| 5 | @Entry | 5 | @Entry |
| 6 | @Component | 6 | @Component |
| 7 | struct FollowListPage { | 7 | struct FollowListPage { |
| 8 | - @State params:Params = router.getParams() as Params; | 8 | + @State params:Record<string, string> = router.getParams() as Record<string, string>; |
| 9 | @State curIndex: string = '0'; | 9 | @State curIndex: string = '0'; |
| 10 | 10 | ||
| 11 | onPageShow() { | 11 | onPageShow() { |
| 12 | - this.curIndex = this.params?.pageID; | 12 | + this.curIndex = this.params?.['index']; |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | build() { | 15 | build() { |
| @@ -65,9 +65,8 @@ struct MineHomePage { | @@ -65,9 +65,8 @@ struct MineHomePage { | ||
| 65 | .height('130lpx') | 65 | .height('130lpx') |
| 66 | .objectFit(ImageFit.Cover) | 66 | .objectFit(ImageFit.Cover) |
| 67 | }.onClick(()=>{ | 67 | }.onClick(()=>{ |
| 68 | - let params: Params = { | ||
| 69 | - pageID: "531267787833221"//sit 测试用 512157124138245 | ||
| 70 | - } | 68 | + //TODO 显示头像 |
| 69 | + let params = {'userId': "531267787833221"} as Record<string, string>; | ||
| 71 | WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params) | 70 | WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params) |
| 72 | }).width('135lpx') | 71 | }).width('135lpx') |
| 73 | .height('135lpx') | 72 | .height('135lpx') |
| @@ -11,11 +11,11 @@ const TAG = "OtherNormalUserHomePage" | @@ -11,11 +11,11 @@ const TAG = "OtherNormalUserHomePage" | ||
| 11 | @Entry | 11 | @Entry |
| 12 | @Component | 12 | @Component |
| 13 | struct OtherNormalUserHomePage { | 13 | struct OtherNormalUserHomePage { |
| 14 | - @State params:Params = router.getParams() as Params; | 14 | + @State params:Record<string, string> = router.getParams() as Record<string, string>; |
| 15 | @Watch('change') @State curUserId: string = '-1'; | 15 | @Watch('change') @State curUserId: string = '-1'; |
| 16 | 16 | ||
| 17 | onPageShow() { | 17 | onPageShow() { |
| 18 | - this.curUserId = this.params?.pageID; | 18 | + this.curUserId = this.params?.['userId']; |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | change(){ | 21 | change(){ |
-
Please register or login to post a comment