Showing
10 changed files
with
52 additions
and
16 deletions
| @@ -99,8 +99,12 @@ struct PeopleShipHomePage { | @@ -99,8 +99,12 @@ struct PeopleShipHomePage { | ||
| 99 | 99 | ||
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | - async aboutToAppear() { | 102 | + aboutToAppear() { |
| 103 | 103 | ||
| 104 | + this.getData() | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + private async getData() { | ||
| 104 | try { | 108 | try { |
| 105 | // 获取页面信息 | 109 | // 获取页面信息 |
| 106 | this.detailModel = await PeopleShipHomePageDataModel.getPeopleShipHomePageDetailInfo(this.creatorId, '', '') | 110 | this.detailModel = await PeopleShipHomePageDataModel.getPeopleShipHomePageDetailInfo(this.creatorId, '', '') |
| @@ -117,8 +121,6 @@ struct PeopleShipHomePage { | @@ -117,8 +121,6 @@ struct PeopleShipHomePage { | ||
| 117 | } catch (exception) { | 121 | } catch (exception) { |
| 118 | 122 | ||
| 119 | } | 123 | } |
| 120 | - | ||
| 121 | - | ||
| 122 | } | 124 | } |
| 123 | 125 | ||
| 124 | findFollowStata(followList: QueryListIsFollowedItem[]) { | 126 | findFollowStata(followList: QueryListIsFollowedItem[]) { |
| @@ -156,8 +158,10 @@ struct PeopleShipHomePage { | @@ -156,8 +158,10 @@ struct PeopleShipHomePage { | ||
| 156 | PageRepository.postInteractAccentionOperate(params).then(res => { | 158 | PageRepository.postInteractAccentionOperate(params).then(res => { |
| 157 | if (this.isAttention == '1') { | 159 | if (this.isAttention == '1') { |
| 158 | this.isAttention = '0' | 160 | this.isAttention = '0' |
| 161 | + this.detailModel.fansNum -= 1 | ||
| 159 | } else { | 162 | } else { |
| 160 | this.isAttention = '1' | 163 | this.isAttention = '1' |
| 164 | + this.detailModel.fansNum += 1 | ||
| 161 | } | 165 | } |
| 162 | this.isLoadingAttention = false | 166 | this.isLoadingAttention = false |
| 163 | }) | 167 | }) |
| @@ -339,8 +339,8 @@ export struct TopNavigationComponent { | @@ -339,8 +339,8 @@ export struct TopNavigationComponent { | ||
| 339 | }else { | 339 | }else { |
| 340 | Row() { | 340 | Row() { |
| 341 | Image($r('app.media.icon_search')) | 341 | Image($r('app.media.icon_search')) |
| 342 | - .width(18) | ||
| 343 | - .height(18) | 342 | + .width('24vp') |
| 343 | + .height('24vp') | ||
| 344 | } | 344 | } |
| 345 | .height('40vp') | 345 | .height('40vp') |
| 346 | .width('40vp') | 346 | .width('40vp') |
| @@ -280,6 +280,7 @@ export struct PeopleShipMainComponent { | @@ -280,6 +280,7 @@ export struct PeopleShipMainComponent { | ||
| 280 | //批量查询各类型内容动态数据接口 | 280 | //批量查询各类型内容动态数据接口 |
| 281 | this.checkContentInteractData(listData.list, resolve) | 281 | this.checkContentInteractData(listData.list, resolve) |
| 282 | } else { | 282 | } else { |
| 283 | + this.hasMore = false; | ||
| 283 | this.resolveEnd(true, resolve) | 284 | this.resolveEnd(true, resolve) |
| 284 | } | 285 | } |
| 285 | 286 |
| @@ -25,12 +25,27 @@ export struct PeopleShipRecommendHeadComponent { | @@ -25,12 +25,27 @@ export struct PeopleShipRecommendHeadComponent { | ||
| 25 | }) | 25 | }) |
| 26 | }.margin({ top: 12, bottom: 8 }) | 26 | }.margin({ top: 12, bottom: 8 }) |
| 27 | 27 | ||
| 28 | - Text(this.rmhInfo.userName) | ||
| 29 | - .fontColor($r('app.color.color_222222')) | ||
| 30 | - .fontSize($r('app.float.vp_14')) | ||
| 31 | - .fontWeight(600) | ||
| 32 | - .maxLines(1) | ||
| 33 | - .textOverflow({overflow: TextOverflow.Ellipsis}) | 28 | + Row() { |
| 29 | + Text(this.rmhInfo.userName) | ||
| 30 | + .fontColor($r('app.color.color_222222')) | ||
| 31 | + .fontSize($r('app.float.vp_14')) | ||
| 32 | + .fontWeight(600) | ||
| 33 | + .maxLines(1) | ||
| 34 | + .textOverflow({overflow: TextOverflow.Ellipsis}) | ||
| 35 | + if (this.rmhInfo.authIcon) { | ||
| 36 | + Image(this.rmhInfo.authIcon) | ||
| 37 | + .width('12vp') | ||
| 38 | + .height('12vp') | ||
| 39 | + .borderRadius(6) | ||
| 40 | + .objectFit(ImageFit.Cover) | ||
| 41 | + .margin({ | ||
| 42 | + left: '2vp' | ||
| 43 | + }) | ||
| 44 | + } | ||
| 45 | + } | ||
| 46 | + .alignItems(VerticalAlign.Center) | ||
| 47 | + .justifyContent(FlexAlign.Center) | ||
| 48 | + | ||
| 34 | 49 | ||
| 35 | Text(this.rmhInfo.introduction) | 50 | Text(this.rmhInfo.introduction) |
| 36 | .fontColor($r('app.color.color_B0B0B0')) | 51 | .fontColor($r('app.color.color_B0B0B0')) |
| @@ -24,7 +24,7 @@ export struct PeopleShipHomeListComponent { | @@ -24,7 +24,7 @@ export struct PeopleShipHomeListComponent { | ||
| 24 | // 列表 | 24 | // 列表 |
| 25 | else if (this.publishCount == 0) { | 25 | else if (this.publishCount == 0) { |
| 26 | // 无数据展示 | 26 | // 无数据展示 |
| 27 | - EmptyComponent({emptyType: 13}).height(DisplayUtils.getDeviceHeight() - this.topHeight) | 27 | + EmptyComponent({emptyType: 12}).height(DisplayUtils.getDeviceHeight() - this.topHeight) |
| 28 | } else { | 28 | } else { |
| 29 | Column() { | 29 | Column() { |
| 30 | Column() { | 30 | Column() { |
| 1 | import router from '@ohos.router' | 1 | import router from '@ohos.router' |
| 2 | import { PeopleShipUserDetailData } from 'wdBean' | 2 | import { PeopleShipUserDetailData } from 'wdBean' |
| 3 | import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent' | 3 | import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent' |
| 4 | +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' | ||
| 4 | 5 | ||
| 5 | @Component | 6 | @Component |
| 6 | export struct PeopleShipHomePageNavComponent { | 7 | export struct PeopleShipHomePageNavComponent { |
| @@ -38,8 +39,13 @@ export struct PeopleShipHomePageNavComponent { | @@ -38,8 +39,13 @@ export struct PeopleShipHomePageNavComponent { | ||
| 38 | iconDiameter: 10, | 39 | iconDiameter: 10, |
| 39 | headPhotoUrl: (this.detailModel.headPhotoUrl && this.detailModel.headPhotoUrl.length > 0 ) ? this.detailModel.headPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon'), | 40 | headPhotoUrl: (this.detailModel.headPhotoUrl && this.detailModel.headPhotoUrl.length > 0 ) ? this.detailModel.headPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon'), |
| 40 | authIcon: this.detailModel.authIcon | 41 | authIcon: this.detailModel.authIcon |
| 41 | - }) | ||
| 42 | - .margin({ | 42 | + }).onClick(()=>{ |
| 43 | + let params = { | ||
| 44 | + 'headPhotoUrl': this.detailModel.headPhotoUrl, | ||
| 45 | + 'headType': '1' | ||
| 46 | + } as Record<string, string>; | ||
| 47 | + WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params) | ||
| 48 | + }).margin({ | ||
| 43 | left: '10vp', | 49 | left: '10vp', |
| 44 | }) | 50 | }) |
| 45 | .visibility((this.topOpacity > 0.5 ? Visibility.Visible : Visibility.Hidden)) | 51 | .visibility((this.topOpacity > 0.5 ? Visibility.Visible : Visibility.Hidden)) |
| @@ -9,6 +9,7 @@ export struct PeopleShipHomePageHeadComponent { | @@ -9,6 +9,7 @@ export struct PeopleShipHomePageHeadComponent { | ||
| 9 | Stack({ alignContent: Alignment.BottomEnd }) { | 9 | Stack({ alignContent: Alignment.BottomEnd }) { |
| 10 | // 头像 | 10 | // 头像 |
| 11 | Image( this.headPhotoUrl ) | 11 | Image( this.headPhotoUrl ) |
| 12 | + .alt($r('app.media.WDAccountOwnerHedaerDefaultIcon')) | ||
| 12 | .width(this.diameter) | 13 | .width(this.diameter) |
| 13 | .height(this.diameter) | 14 | .height(this.diameter) |
| 14 | .borderRadius(this.diameter/2) | 15 | .borderRadius(this.diameter/2) |
| @@ -7,6 +7,7 @@ import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageD | @@ -7,6 +7,7 @@ import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageD | ||
| 7 | import { InfluenceData, PeopleShipUserDetailData } from 'wdBean' | 7 | import { InfluenceData, PeopleShipUserDetailData } from 'wdBean' |
| 8 | import { PeopleShipHomeAttentionComponent } from './PeopleShipHomeAttentionComponent' | 8 | import { PeopleShipHomeAttentionComponent } from './PeopleShipHomeAttentionComponent' |
| 9 | import { HWLocationUtils } from 'wdHwAbility' | 9 | import { HWLocationUtils } from 'wdHwAbility' |
| 10 | +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' | ||
| 10 | 11 | ||
| 11 | 12 | ||
| 12 | @Component | 13 | @Component |
| @@ -51,6 +52,12 @@ export struct PeopleShipHomePageTopComponent { | @@ -51,6 +52,12 @@ export struct PeopleShipHomePageTopComponent { | ||
| 51 | }).margin({ | 52 | }).margin({ |
| 52 | left: '10vp', | 53 | left: '10vp', |
| 53 | bottom: '20vp' | 54 | bottom: '20vp' |
| 55 | + }).onClick(()=>{ | ||
| 56 | + let params = { | ||
| 57 | + 'headPhotoUrl': this.detailModel.headPhotoUrl, | ||
| 58 | + 'headType': '1' | ||
| 59 | + } as Record<string, string>; | ||
| 60 | + WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params) | ||
| 54 | }) | 61 | }) |
| 55 | 62 | ||
| 56 | 63 |
| @@ -235,7 +235,7 @@ export struct EmptyComponent { | @@ -235,7 +235,7 @@ export struct EmptyComponent { | ||
| 235 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_ContentFailed) { | 235 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_ContentFailed) { |
| 236 | imageString = $r('app.media.icon_no_content') | 236 | imageString = $r('app.media.icon_no_content') |
| 237 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoCreation) { | 237 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoCreation) { |
| 238 | - imageString = $r('app.media.icon_no_appointmentMade') | 238 | + imageString = $r('app.media.icon_no_works1') |
| 239 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoBooking) { | 239 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoBooking) { |
| 240 | imageString = $r('app.media.icon_no_appointmentMade') | 240 | imageString = $r('app.media.icon_no_appointmentMade') |
| 241 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NetworkFailed) { | 241 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NetworkFailed) { |
| @@ -4,16 +4,18 @@ import { router } from '@kit.ArkUI'; | @@ -4,16 +4,18 @@ 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 = '' | ||
| 7 | @State params:Record<string, string> = router.getParams() as Record<string, string>; | 8 | @State params:Record<string, string> = router.getParams() as Record<string, string>; |
| 8 | 9 | ||
| 9 | onPageShow() { | 10 | onPageShow() { |
| 10 | this.headPhotoUrl = this.params?.['headPhotoUrl']; | 11 | this.headPhotoUrl = this.params?.['headPhotoUrl']; |
| 12 | + this.headType = this.params?.['headType'] ?? ''; | ||
| 11 | } | 13 | } |
| 12 | 14 | ||
| 13 | build() { | 15 | build() { |
| 14 | Row() { | 16 | Row() { |
| 15 | Image(this.headPhotoUrl) | 17 | Image(this.headPhotoUrl) |
| 16 | - .alt($r('app.media.default_head')) | 18 | + .alt(this.headType.length > 0 ? $r('app.media.WDAccountOwnerHedaerDefaultIcon') : $r('app.media.default_head')) |
| 17 | .width('720lpx') | 19 | .width('720lpx') |
| 18 | .height('720lpx') | 20 | .height('720lpx') |
| 19 | .objectFit(ImageFit.Auto) | 21 | .objectFit(ImageFit.Auto) |
-
Please register or login to post a comment