wangyong_wd

compStyle:13 新增音频图标

... ... @@ -28,5 +28,5 @@ export interface CompDTO {
sortValue: number;
subType: string;
imageScale: number; // 封面图比例 1-4:3, 2-16:9, 3-3:2
audioDataList:AudioDTO[]
audioDataList: AudioDTO[]
}
\ No newline at end of file
... ...
... ... @@ -3,7 +3,7 @@ import { LiveInfoDTO } from '../detail/LiveInfoDTO';
import { VideoInfoDTO } from '../detail/VideoInfoDTO';
import { InteractDataDTO } from './InteractDataDTO';
import { slideShows } from '../morningevening/slideShows'
import { VoiceInfoDTO } from '../detail/VoiceInfoDTO'
export interface ContentDTO {
cityCode: string;
... ... @@ -62,5 +62,6 @@ export interface ContentDTO {
interactData:InteractDataDTO;
hasMore: number,
slideShows: slideShows[]
slideShows: slideShows[],
voiceInfo: VoiceInfoDTO
}
\ No newline at end of file
... ...
export interface VoiceInfoDTO {
defaultMultiple?: string;
openMultipleAdjustment?: number;
type?: number;
voiceDuration: number;
voiceUrl?: string;
}
\ No newline at end of file
... ...
... ... @@ -93,6 +93,25 @@ export struct SingleImageCardComponent {
bottom: 4
})
.backgroundColor($r('app.color.color_4d000000'))
} else if(this.compDTO.operDataList[0].voiceInfo) {
Row() {
Image($r('app.media.icon_listen'))
.width(22)
.height(18)
Text(DateTimeUtils.getFormattedDuration(this.compDTO.operDataList[0].voiceInfo
.voiceDuration * 1000))
.fontSize($r('app.float.font_size_13'))
.fontWeight(400)
.fontColor($r('app.color.color_fff'))
}
.alignItems(VerticalAlign.Bottom)
.height(18)
.padding({ right: 4 })
.margin({
right: 4,
bottom: 4
})
.backgroundColor($r('app.color.color_4d000000'))
}
}.alignContent(Alignment.BottomEnd)
}
... ...