Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yangchenggong1_wd
2024-04-25 16:25:10 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9367f2417da5e660591467cf80fa5cba6062fb3d
9367f241
1 parent
a5f98660
desc:跳转params 修改定义
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
28 deletions
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow02.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow05.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomFollowComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/FollowListPage.ets
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/pages/OtherNormalUserHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow02.ets
View file @
9367f24
...
...
@@ -70,9 +70,7 @@ export struct ZhSingleRow02 {
.height(14)
.onClick(() => {
// TODO 跳转的页面,定义的入参可能不合理。推荐id: 41
let params: Params = {
pageID: "1"
}
let params = {'index': "1"} as Record<string, string>
WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params)
})
}
...
...
@@ -80,9 +78,7 @@ export struct ZhSingleRow02 {
right: $r('app.float.card_comp_pagePadding_lf'),
})
.onClick(() => {
let params: Params = {
pageID: "1"
}
let params = {'index': "1"} as Record<string, string>;
WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params)
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow05.ets
View file @
9367f24
...
...
@@ -83,9 +83,7 @@ export struct ZhSingleRow05 {
.height(14)
.onClick(() => {
// TODO 跳转的页面,定义的入参可能不合理。推荐id: 41
let params: Params = {
pageID: "1"
}
let params = {'index': "1"} as Record<string, string>;
WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params)
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomComponent.ets
View file @
9367f24
...
...
@@ -89,9 +89,7 @@ export struct HomePageBottomComponent{
.backgroundColor($r('app.color.color_F5F5F5'))
.margin({top:'31lpx',bottom:'4lpx'})
.onClick(()=>{
let params: Params = {
pageID: "1"
}
let params = {'index': "1"} as Record<string, string>
WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params)
})
...
...
@@ -128,9 +126,7 @@ export struct HomePageBottomComponent{
.backgroundColor($r('app.color.color_F5F5F5'))
.margin({top:'31lpx',bottom:'4lpx'})
}.onClick(()=>{
let params: Params = {
pageID: "1"
}
let params = {'index': "1"} as Record<string, string>
WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params)
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomFollowComponent.ets
View file @
9367f24
...
...
@@ -51,9 +51,7 @@ export struct OtherHomePageBottomFollowComponent{
.backgroundColor($r('app.color.color_F5F5F5'))
.margin({top:'31lpx',bottom:'4lpx'})
.onClick(()=>{
let params: Params = {
pageID: "1"
}
let params = {'index': "1"} as Record<string, string>
WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params)
})
...
...
@@ -85,9 +83,7 @@ export struct OtherHomePageBottomFollowComponent{
.backgroundColor($r('app.color.color_F5F5F5'))
.margin({top:'31lpx',bottom:'4lpx'})
}.onClick(()=>{
let params: Params = {
pageID: "1"
}
let params = {'index': "1"} as Record<string, string>;
WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params)
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/FollowListPage.ets
View file @
9367f24
...
...
@@ -5,11 +5,11 @@ import router from '@ohos.router';
@Entry
@Component
struct FollowListPage {
@State params:
Params = router.getParams() as Params
;
@State params:
Record<string, string> = router.getParams() as Record<string, string>
;
@State curIndex: string = '0';
onPageShow() {
this.curIndex = this.params?.
pageID
;
this.curIndex = this.params?.
['index']
;
}
build() {
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
View file @
9367f24
...
...
@@ -65,9 +65,8 @@ struct MineHomePage {
.height('130lpx')
.objectFit(ImageFit.Cover)
}.onClick(()=>{
let params: Params = {
pageID: "531267787833221"//sit 测试用 512157124138245
}
//TODO 显示头像
let params = {'userId': "531267787833221"} as Record<string, string>;
WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params)
}).width('135lpx')
.height('135lpx')
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/OtherNormalUserHomePage.ets
View file @
9367f24
...
...
@@ -11,11 +11,11 @@ const TAG = "OtherNormalUserHomePage"
@Entry
@Component
struct OtherNormalUserHomePage {
@State params:
Params = router.getParams() as Params
;
@State params:
Record<string, string> = router.getParams() as Record<string, string>
;
@Watch('change') @State curUserId: string = '-1';
onPageShow() {
this.curUserId = this.params?.
pageID
;
this.curUserId = this.params?.
['userId']
;
}
change(){
...
...
Please
register
or
login
to post a comment