Showing
4 changed files
with
136 additions
and
0 deletions
| @@ -77,6 +77,8 @@ export { ShareInfoDTO } from './src/main/ets/bean/detail/ShareInfoDTO'; | @@ -77,6 +77,8 @@ export { ShareInfoDTO } from './src/main/ets/bean/detail/ShareInfoDTO'; | ||
| 77 | 77 | ||
| 78 | export { VideoInfoDTO } from './src/main/ets/bean/detail/VideoInfoDTO'; | 78 | export { VideoInfoDTO } from './src/main/ets/bean/detail/VideoInfoDTO'; |
| 79 | 79 | ||
| 80 | +export { AttentionRmhInfoDTO } from './src/main/ets/bean/detail/AttentionRmhInfoDTO'; | ||
| 81 | + | ||
| 80 | export { H5ReceiveDetailBean } from './src/main/ets/bean/h5/H5ReceiveDetailBean'; | 82 | export { H5ReceiveDetailBean } from './src/main/ets/bean/h5/H5ReceiveDetailBean'; |
| 81 | 83 | ||
| 82 | export { H5ReceiveDataJsonBean } from './src/main/ets/bean/h5/H5ReceiveDataJsonBean'; | 84 | export { H5ReceiveDataJsonBean } from './src/main/ets/bean/h5/H5ReceiveDataJsonBean'; |
| 1 | +export interface AttentionRmhInfoDTO { | ||
| 2 | + attentionCreatorId: string; | ||
| 3 | + attentionHeadPhotoUrl: string; | ||
| 4 | + attentionNum: number; | ||
| 5 | + attentionUserId: string; | ||
| 6 | + attentionUserName: string; | ||
| 7 | + attentionUserType: number; | ||
| 8 | + authIcon: string; | ||
| 9 | + authId: number; | ||
| 10 | + authPersional: string; | ||
| 11 | + authTitle: string; | ||
| 12 | + banControl: number; | ||
| 13 | + categoryAuth: string; | ||
| 14 | + cnLiveCommentControl: number; | ||
| 15 | + cnLiveGiftControl: number; | ||
| 16 | + cnLiveLikeControl: number; | ||
| 17 | + cnLiveShareControl: number; | ||
| 18 | + cnShareControl: number; | ||
| 19 | + collectNum: number; | ||
| 20 | + commentNum: number; | ||
| 21 | + createTime: number; | ||
| 22 | + fansNum: number; | ||
| 23 | + honoraryIcon: string; | ||
| 24 | + honoraryTitle: string; | ||
| 25 | + id: number; | ||
| 26 | + introduction: string; | ||
| 27 | + isAttention: number | null; | ||
| 28 | + isComment: number; | ||
| 29 | + isLike: number; | ||
| 30 | + isVisiable: number; | ||
| 31 | + likeNum: number; | ||
| 32 | + liveCommentControl: number; | ||
| 33 | + liveGiftControl: number; | ||
| 34 | + liveLikeControl: number; | ||
| 35 | + liveShareControl: number; | ||
| 36 | + mainControl: number; | ||
| 37 | + posterShareControl: number; | ||
| 38 | + registTime: number; | ||
| 39 | + shareControl: number; | ||
| 40 | + shareNum: number; | ||
| 41 | + status: number; | ||
| 42 | + subjectType: string; | ||
| 43 | + updateTime: number; | ||
| 44 | + userId: string; | ||
| 45 | + userType: number | ||
| 46 | +} |
sight_harmony/features/wdComponent/src/main/ets/components/cardview/AttentionListComponent.ets
0 → 100644
| 1 | +import { AttentionRmhInfoDTO } from 'wdBean'; | ||
| 2 | +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | ||
| 3 | + | ||
| 4 | +/** | ||
| 5 | + * AttentionListComponent 人民号-关注-我的关注 | ||
| 6 | + * 没有compstyle | ||
| 7 | + */ | ||
| 8 | +const TAG = '人民号-关注-我的关注' | ||
| 9 | + | ||
| 10 | +@Entry | ||
| 11 | +@Component | ||
| 12 | +export struct AttentionListComponent { | ||
| 13 | + @State attentionList: AttentionRmhInfoDTO[] = [] as AttentionRmhInfoDTO[] | ||
| 14 | + | ||
| 15 | + build() { | ||
| 16 | + Row({ space: 4 }) { | ||
| 17 | + List() { | ||
| 18 | + ListItem() { | ||
| 19 | + Column() { | ||
| 20 | + Image($r('app.media.attention_mine')) | ||
| 21 | + .width(48) | ||
| 22 | + .height(48) | ||
| 23 | + .padding(12) | ||
| 24 | + .backgroundColor($r('app.color.color_F5F5F5')) | ||
| 25 | + .borderRadius(50) | ||
| 26 | + .margin({ bottom: 8 }) | ||
| 27 | + Text('我的关注') | ||
| 28 | + .fontSize($r('app.float.font_size_13')) | ||
| 29 | + .fontColor($r('app.color.color_666666')) | ||
| 30 | + } | ||
| 31 | + .width(78) | ||
| 32 | + .height(74) | ||
| 33 | + .onClick(() => { | ||
| 34 | + // 跳转到关注列表-我的 | ||
| 35 | + WDRouterRule.jumpWithPage(WDRouterPage.followListPage) | ||
| 36 | + }) | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + ForEach(this.attentionList, (item: AttentionRmhInfoDTO, index: number) => { | ||
| 40 | + ListItem() { | ||
| 41 | + Column() { | ||
| 42 | + Stack() { | ||
| 43 | + Image(item.attentionHeadPhotoUrl) | ||
| 44 | + .width(48) | ||
| 45 | + .height(48) | ||
| 46 | + .borderRadius(50) | ||
| 47 | + Image(item.authIcon) | ||
| 48 | + .width(14) | ||
| 49 | + .height(14) | ||
| 50 | + .borderRadius(50) | ||
| 51 | + } | ||
| 52 | + .margin({ bottom: 8 }) | ||
| 53 | + .alignContent(Alignment.BottomEnd) | ||
| 54 | + | ||
| 55 | + Text(item.attentionUserName) | ||
| 56 | + .fontSize($r('app.float.font_size_13')) | ||
| 57 | + .fontColor($r('app.color.color_666666')) | ||
| 58 | + .textOverflowStyle(1) | ||
| 59 | + } | ||
| 60 | + .margin({ | ||
| 61 | + right: index === this.attentionList.length - 1 ? $r('app.float.card_comp_pagePadding_lf') : 0, | ||
| 62 | + }) | ||
| 63 | + .padding({ left: 2, right: 2 }) | ||
| 64 | + } | ||
| 65 | + .width(78) | ||
| 66 | + .height(74) | ||
| 67 | + .onClick(() => { | ||
| 68 | + //TODO 跳转到对应的人民号主页 | ||
| 69 | + | ||
| 70 | + }) | ||
| 71 | + }) | ||
| 72 | + } | ||
| 73 | + .listDirection(Axis.Horizontal) | ||
| 74 | + .height(74) | ||
| 75 | + } | ||
| 76 | + .padding({ | ||
| 77 | + left: $r('app.float.card_comp_pagePadding_lf'), | ||
| 78 | + top: $r('app.float.card_comp_pagePadding_tb'), | ||
| 79 | + bottom: $r('app.float.card_comp_pagePadding_tb') | ||
| 80 | + }) | ||
| 81 | + } | ||
| 82 | +} | ||
| 83 | + | ||
| 84 | +@Extend(Text) | ||
| 85 | +function textOverflowStyle(maxLine: number) { | ||
| 86 | + .maxLines(maxLine) | ||
| 87 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 88 | +} |
877 Bytes
-
Please register or login to post a comment