陈剑华

feat: 17003 UI还原问题--搜索结果页-间距较大且视频时长字体与安卓不一致

... ... @@ -2,6 +2,7 @@ import { ContentDTO, joinPeopleNum } from 'wdBean/Index'
import { DateTimeUtils } from 'wdKit/Index'
import { LottieView } from '../../components/lottie/LottieView';
import { LiveModel } from '../../viewmodel/LiveModel'
import font from '@ohos.font';
/**
* 这里是样式卡中,右下角显示的音视频信息
... ... @@ -18,6 +19,11 @@ export struct CardMediaInfo {
aboutToAppear(): void {
this.getJoinPeopleNum();
font.registerFont({
familyName: 'BebasNeue',
familySrc: $rawfile('font/BebasNeue.ttf')
})
}
/**
... ... @@ -66,7 +72,7 @@ export struct CardMediaInfo {
if (this.contentDTO.videoInfo != null) {
Text(DateTimeUtils.getFormattedDuration(this.contentDTO.videoInfo.videoDuration * 1000))
.mediaText()
.fontFamily('BebasNeueBold')
.fontFamily('BebasNeue')
}
}
} else if (this.contentDTO.objectType === '2') {
... ... @@ -133,7 +139,7 @@ export struct CardMediaInfo {
.mediaLogo()
Text(DateTimeUtils.getFormattedDuration(this.contentDTO.voiceInfo.voiceDuration * 1000))
.mediaText()
.fontFamily('BebasNeueBold')
.fontFamily('BebasNeue')
}
} else if (this.contentDTO.objectType === '4') {//广告标签
Text($r('app.string.comp_advertisement'))
... ...