yanlu

fix:早晚报视频展示效果

import { Action, ContentDTO, Params } from 'wdBean';
import { CommonConstants, ConfigConstants, ScreenType } from 'wdConstant';
import { Logger, ToastUtils } from 'wdKit';
import { Logger, ToastUtils, DateTimeUtils } from 'wdKit';
import { CompUtils } from '../../utils/CompUtils';
import { ProcessUtils, WDRouterRule } from 'wdRouter';
... ... @@ -433,15 +433,32 @@ export struct PaperSingleColumn999CardView {
.aspectRatio(16 / 9)
.padding({ top: 10 })
if (this.item?.videoInfo) {
Stack() {
Text(this.item?.videoInfo.videoDuration + "")
.backgroundColor(Color.Black)
.opacity(0.6)
Row() {
Image($r('app.media.card_play'))
.width(14)
.height(14)
.objectFit(ImageFit.Contain)
Text(DateTimeUtils.getFormattedDuration(this.item?.videoInfo.videoDuration * 1000))
.fontColor(Color.White)
.fontSize($r('app.float.vp_12'))
.fontWeight(500)
.textAlign(TextAlign.End)
.lineHeight(18)
.textShadow({
radius: 2,
color: 'rgba(0,0,0,0.3)',
offsetY: 2
})
.margin({
right: 10,
left: 3
})
}
.margin({
bottom: 3
})
.width(CommonConstants.FULL_PARENT)
.padding({ left: 40 })
Image($r('app.media.iv_card_play_yellow_flag'))
.fitOriginalSize(true)
}.width(CommonConstants.FULL_PARENT)
.justifyContent(FlexAlign.End)
}
}.margin({ left: 22, right: 22 })
}
... ...