Showing
6 changed files
with
38 additions
and
8 deletions
| @@ -136,4 +136,9 @@ export class WDRouterPage { | @@ -136,4 +136,9 @@ export class WDRouterPage { | ||
| 136 | 136 | ||
| 137 | //意见反馈 | 137 | //意见反馈 |
| 138 | static feedBackActivity = new WDRouterPage("wdComponent", "ets/components/FeedBackActivity"); | 138 | static feedBackActivity = new WDRouterPage("wdComponent", "ets/components/FeedBackActivity"); |
| 139 | + | ||
| 140 | + // 人民号主页头像显示 | ||
| 141 | + static showHomePageHeaderPage = new WDRouterPage("wdComponent", "ets/pages/ShowHomePageHeaderPage"); | ||
| 142 | + | ||
| 143 | + | ||
| 139 | } | 144 | } |
| @@ -43,9 +43,8 @@ export struct PeopleShipHomePageNavComponent { | @@ -43,9 +43,8 @@ export struct PeopleShipHomePageNavComponent { | ||
| 43 | }).onClick(()=>{ | 43 | }).onClick(()=>{ |
| 44 | let params = { | 44 | let params = { |
| 45 | 'headPhotoUrl': this.detailModel.headPhotoUrl, | 45 | 'headPhotoUrl': this.detailModel.headPhotoUrl, |
| 46 | - 'headType': '1' | ||
| 47 | } as Record<string, string>; | 46 | } as Record<string, string>; |
| 48 | - WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params) | 47 | + WDRouterRule.jumpWithPage(WDRouterPage.showHomePageHeaderPage,params) |
| 49 | }).margin({ | 48 | }).margin({ |
| 50 | left: '10vp', | 49 | left: '10vp', |
| 51 | }) | 50 | }) |
| @@ -56,9 +56,8 @@ export struct PeopleShipHomePageTopComponent { | @@ -56,9 +56,8 @@ export struct PeopleShipHomePageTopComponent { | ||
| 56 | }).onClick(() => { | 56 | }).onClick(() => { |
| 57 | let params = { | 57 | let params = { |
| 58 | 'headPhotoUrl': this.detailModel.headPhotoUrl, | 58 | 'headPhotoUrl': this.detailModel.headPhotoUrl, |
| 59 | - 'headType': '1' | ||
| 60 | } as Record<string, string>; | 59 | } as Record<string, string>; |
| 61 | - WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage, params) | 60 | + WDRouterRule.jumpWithPage(WDRouterPage.showHomePageHeaderPage, params) |
| 62 | }) | 61 | }) |
| 63 | 62 | ||
| 64 | 63 |
| 1 | +import { router } from '@kit.ArkUI'; | ||
| 2 | + | ||
| 3 | +@Entry | ||
| 4 | +@Component | ||
| 5 | +struct ShowHomePageHeaderPage { | ||
| 6 | + @State headPhotoUrl: string = ''; | ||
| 7 | + @State params:Record<string, string> = router.getParams() as Record<string, string>; | ||
| 8 | + | ||
| 9 | + onPageShow() { | ||
| 10 | + this.headPhotoUrl = this.params?.['headPhotoUrl']; | ||
| 11 | + } | ||
| 12 | + | ||
| 13 | + build() { | ||
| 14 | + Row() { | ||
| 15 | + Image(this.headPhotoUrl) | ||
| 16 | + .alt( $r('app.media.WDAccountOwnerHedaerDefaultIcon') ) | ||
| 17 | + .width('100%') | ||
| 18 | + .objectFit(ImageFit.Contain) | ||
| 19 | + } | ||
| 20 | + .width('100%') | ||
| 21 | + .height('100%') | ||
| 22 | + .alignItems(VerticalAlign.Center) | ||
| 23 | + .backgroundColor($r('app.color.color_000000')) | ||
| 24 | + .onClick(()=>{ | ||
| 25 | + router.back() | ||
| 26 | + }) | ||
| 27 | + } | ||
| 28 | +} |
| @@ -4,18 +4,16 @@ import { router } from '@kit.ArkUI'; | @@ -4,18 +4,16 @@ import { router } from '@kit.ArkUI'; | ||
| 4 | @Component | 4 | @Component |
| 5 | struct ShowUserHeaderPage { | 5 | struct ShowUserHeaderPage { |
| 6 | @State headPhotoUrl: string = ''; | 6 | @State headPhotoUrl: string = ''; |
| 7 | - @State headType: string = '' | ||
| 8 | @State params:Record<string, string> = router.getParams() as Record<string, string>; | 7 | @State params:Record<string, string> = router.getParams() as Record<string, string>; |
| 9 | 8 | ||
| 10 | onPageShow() { | 9 | onPageShow() { |
| 11 | this.headPhotoUrl = this.params?.['headPhotoUrl']; | 10 | this.headPhotoUrl = this.params?.['headPhotoUrl']; |
| 12 | - this.headType = this.params?.['headType'] ?? ''; | ||
| 13 | } | 11 | } |
| 14 | 12 | ||
| 15 | build() { | 13 | build() { |
| 16 | Row() { | 14 | Row() { |
| 17 | Image(this.headPhotoUrl) | 15 | Image(this.headPhotoUrl) |
| 18 | - .alt(this.headType.length > 0 ? $r('app.media.WDAccountOwnerHedaerDefaultIcon') : $r('app.media.default_head')) | 16 | + .alt($r('app.media.default_head')) |
| 19 | .width('720lpx') | 17 | .width('720lpx') |
| 20 | .height('720lpx') | 18 | .height('720lpx') |
| 21 | .objectFit(ImageFit.Auto) | 19 | .objectFit(ImageFit.Auto) |
| @@ -24,6 +24,7 @@ | @@ -24,6 +24,7 @@ | ||
| 24 | "components/page/ThemeListPage", | 24 | "components/page/ThemeListPage", |
| 25 | "pages/ShowUserHeaderPage", | 25 | "pages/ShowUserHeaderPage", |
| 26 | "pages/MineMessagePage", | 26 | "pages/MineMessagePage", |
| 27 | - "components/page/InteractMessagePage" | 27 | + "components/page/InteractMessagePage", |
| 28 | + "pages/ShowHomePageHeaderPage" | ||
| 28 | ] | 29 | ] |
| 29 | } | 30 | } |
-
Please register or login to post a comment