Showing
4 changed files
with
30 additions
and
3 deletions
| @@ -28,5 +28,5 @@ export interface CompDTO { | @@ -28,5 +28,5 @@ export interface CompDTO { | ||
| 28 | sortValue: number; | 28 | sortValue: number; |
| 29 | subType: string; | 29 | subType: string; |
| 30 | imageScale: number; // 封面图比例 1-4:3, 2-16:9, 3-3:2 | 30 | imageScale: number; // 封面图比例 1-4:3, 2-16:9, 3-3:2 |
| 31 | - audioDataList:AudioDTO[] | 31 | + audioDataList: AudioDTO[] |
| 32 | } | 32 | } |
| @@ -3,7 +3,7 @@ import { LiveInfoDTO } from '../detail/LiveInfoDTO'; | @@ -3,7 +3,7 @@ import { LiveInfoDTO } from '../detail/LiveInfoDTO'; | ||
| 3 | import { VideoInfoDTO } from '../detail/VideoInfoDTO'; | 3 | import { VideoInfoDTO } from '../detail/VideoInfoDTO'; |
| 4 | import { InteractDataDTO } from './InteractDataDTO'; | 4 | import { InteractDataDTO } from './InteractDataDTO'; |
| 5 | import { slideShows } from '../morningevening/slideShows' | 5 | import { slideShows } from '../morningevening/slideShows' |
| 6 | - | 6 | +import { VoiceInfoDTO } from '../detail/VoiceInfoDTO' |
| 7 | 7 | ||
| 8 | export interface ContentDTO { | 8 | export interface ContentDTO { |
| 9 | cityCode: string; | 9 | cityCode: string; |
| @@ -62,5 +62,6 @@ export interface ContentDTO { | @@ -62,5 +62,6 @@ export interface ContentDTO { | ||
| 62 | interactData:InteractDataDTO; | 62 | interactData:InteractDataDTO; |
| 63 | 63 | ||
| 64 | hasMore: number, | 64 | hasMore: number, |
| 65 | - slideShows: slideShows[] | 65 | + slideShows: slideShows[], |
| 66 | + voiceInfo: VoiceInfoDTO | ||
| 66 | } | 67 | } |
| @@ -93,6 +93,25 @@ export struct SingleImageCardComponent { | @@ -93,6 +93,25 @@ export struct SingleImageCardComponent { | ||
| 93 | bottom: 4 | 93 | bottom: 4 |
| 94 | }) | 94 | }) |
| 95 | .backgroundColor($r('app.color.color_4d000000')) | 95 | .backgroundColor($r('app.color.color_4d000000')) |
| 96 | + } else if(this.compDTO.operDataList[0].voiceInfo) { | ||
| 97 | + Row() { | ||
| 98 | + Image($r('app.media.icon_listen')) | ||
| 99 | + .width(22) | ||
| 100 | + .height(18) | ||
| 101 | + Text(DateTimeUtils.getFormattedDuration(this.compDTO.operDataList[0].voiceInfo | ||
| 102 | + .voiceDuration * 1000)) | ||
| 103 | + .fontSize($r('app.float.font_size_13')) | ||
| 104 | + .fontWeight(400) | ||
| 105 | + .fontColor($r('app.color.color_fff')) | ||
| 106 | + } | ||
| 107 | + .alignItems(VerticalAlign.Bottom) | ||
| 108 | + .height(18) | ||
| 109 | + .padding({ right: 4 }) | ||
| 110 | + .margin({ | ||
| 111 | + right: 4, | ||
| 112 | + bottom: 4 | ||
| 113 | + }) | ||
| 114 | + .backgroundColor($r('app.color.color_4d000000')) | ||
| 96 | } | 115 | } |
| 97 | }.alignContent(Alignment.BottomEnd) | 116 | }.alignContent(Alignment.BottomEnd) |
| 98 | } | 117 | } |
-
Please register or login to post a comment