王士厅

fix: 鸿蒙走查 无图卡、单图卡、小视频卡、三图卡、大图卡、图集卡ui修改

... ... @@ -224,6 +224,9 @@ export struct CompParser {
} else {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
}
} else if (this.compDTO.compStyle === CompStyle.Card_03 || this.compDTO.compStyle === CompStyle.Card_13 || this.compDTO.compStyle === CompStyle.Card_06 ||
this.compDTO.compStyle === CompStyle.Card_04 || this.compDTO.compStyle === CompStyle.Card_02 || this.compDTO.compStyle === CompStyle.Card_17) { // 无图卡 左文右图卡 小视频卡 三图卡 大图卡 图集卡
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 }).margin({top:14})
} else if (this.compDTO.compType === 'appStyle' || this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 || this.compDTO.compStyle === CompStyle.Card_Comp_Adv || this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
if (
this.nextCompDTO.compStyle === CompStyle.Card_09 ||
... ... @@ -234,7 +237,6 @@ export struct CompParser {
) {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
} else {
// Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 }).margin({top:8})
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
}
} else {
... ...
... ... @@ -3,6 +3,7 @@ import { DateTimeUtils } from 'wdKit/Index'
import { LottieView } from '../../components/lottie/LottieView';
import { LiveModel } from '../../viewmodel/LiveModel'
import font from '@ohos.font';
import text from '@ohos.graphics.text';
/**
* 这里是样式卡中,右下角显示的音视频信息
... ... @@ -27,7 +28,6 @@ export struct CardMediaInfo {
this.getJoinPeopleNum();
}
font.registerFont({
familyName: 'BebasNeue',
familySrc: $rawfile('font/BebasNeue.ttf')
... ... @@ -82,6 +82,7 @@ export struct CardMediaInfo {
build() {
Row() {
// Text(`${this.contentDTO?.objectType}`)
if (this.contentDTO?.objectType === '1' || this.contentDTO?.objectType === '15') {
// 点播、动态视频
Row() {
... ... @@ -94,7 +95,7 @@ export struct CardMediaInfo {
}
}
// .margin({ left: 68,top: 135})
.margin({ right: 8})
} else if (this.contentDTO.objectType === '2') {
// liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停
// 显示直播信息
... ... @@ -137,7 +138,7 @@ export struct CardMediaInfo {
.mediaText()
}
}else {
} else {
// 当liveInfo存在时后
if (this.contentDTO?.liveInfo?.liveState === 'wait') {
... ... @@ -192,7 +193,7 @@ export struct CardMediaInfo {
.mediaTextImgtype()
.fontFamily('BebasNeue')
}
// .margin({ left: 80,top: 55})
.margin({ right: 8})
} else if (this.contentDTO.objectType === '13') {
// 显示音频信息
... ...
... ... @@ -144,7 +144,7 @@ export struct CardSourceInfo {
// 标签
if (this.contentDTO.cornerMark || this.contentDTO.corner) {
Text(this.contentDTO.cornerMark || this.contentDTO.corner)
.fontSize($r("app.float.font_size_11"))
.fontSize(12)
.fontColor($r("app.color.color_ED2800"))
.margin({ right: 6 })
.flexShrink(0)
... ... @@ -153,7 +153,7 @@ export struct CardSourceInfo {
// 来源信息
if (this.contentDTO.rmhPlatform === 1 || this.contentDTO.source) {
Text(this.displayText)
.fontSize($r("app.float.font_size_11"))
.fontSize(12)
.fontColor($r("app.color.color_B0B0B0"))
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
... ... @@ -183,7 +183,7 @@ export struct CardSourceInfo {
// 发布日期
if (this.showTime()) {
Text(this.handleTimeStr())
.fontSize($r("app.float.font_size_11"))
.fontSize(12)
.fontColor($r("app.color.color_B0B0B0"))
.flexShrink(0)
.margin({ right: 4 })
... ... @@ -196,14 +196,14 @@ export struct CardSourceInfo {
if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 &&
this.showCommentNum()) {
Text(`${this.handlerNum(this.getContentDtoBean()?.interactData?.commentNum.toString())}评`)
.fontSize($r("app.float.font_size_11"))
.fontSize(12)
.fontColor($r("app.color.color_B0B0B0"))
.flexShrink(0)
} else {
if (this.contentDTO.objectType !=='2' && this.isCompInnerSource && this.contentDTO.interactData && this.contentDTO.interactData?.commentNum > 0) {
Text(`${this.handlerNum(this.contentDTO.interactData?.commentNum.toString())}评`)
.fontSize($r("app.float.font_size_11"))
.fontSize(12)
.fontColor($r("app.color.color_B0B0B0"))
.flexShrink(0)
}
... ... @@ -229,11 +229,11 @@ export struct CardSourceInfo {
Span(this.contentDTO.newsTitle)
}
}
.fontSize($r('app.float.font_size_11'))
.fontSize(12)
.fontColor($r("app.color.color_B0B0B0"))
.align(Alignment.Start)
.width('100%')
.margin({top:5})
.margin({top:8})
}
}
.width(CommonConstants.FULL_WIDTH)
... ...
... ... @@ -63,6 +63,9 @@ export struct Card17Component {
.lineHeight(25)
.maxLines(3)
.width(CommonConstants.FULL_WIDTH)
.margin({
top: 14
})
Stack({ alignContent: Alignment.BottomEnd }) {
// 三个图,
... ... @@ -112,6 +115,7 @@ export struct Card17Component {
CardMediaInfo({ contentDTO: this.contentDTO })
}
.width(CommonConstants.FULL_WIDTH)
.margin({ top: 8 })
.onClick((event: ClickEvent) => {
InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
if (router.getState().name !== 'MyCollectionListPage') {
... ... @@ -133,7 +137,7 @@ export struct Card17Component {
})
// 评论等信息
CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO, viewShowData: false })
CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
}
.padding({
left: 10,
... ...
... ... @@ -79,7 +79,7 @@ export struct Card2Component {
.fontSize($r('app.float.font_size_18'))
.fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
.maxLines(2)
.lineHeight(27)
.lineHeight(25)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
.align(Alignment.Start)
.textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
... ... @@ -106,8 +106,8 @@ export struct Card2Component {
})
}
.alignContent(Alignment.BottomEnd)
.margin({ top: 8 })
}
.margin({ top: 8 })
.width(CommonConstants.FULL_WIDTH)
.alignItems(HorizontalAlign.Start)
... ...
... ... @@ -65,7 +65,7 @@ export struct Card3Component {
Span(this.contentDTO.newsTitle)
}
}
.lineHeight(27)
.lineHeight(25)
.fontSize($r("app.float.font_size_18"))
.fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
.width(CommonConstants.FULL_WIDTH)
... ...
... ... @@ -76,7 +76,7 @@ export struct Card4Component {
}
}
.fontSize(17.5)
.lineHeight(27)
.lineHeight(25)
.fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
... ...
... ... @@ -76,7 +76,7 @@ export struct Card6Component {
}
.fontColor(this.clicked ? 0x848484 : 0x222222)
.fontSize(18)
.lineHeight(27)
.lineHeight(25)
.fontWeight(FontWeight.Normal)
.maxLines(this.contentDTO.appStyle === '6' ? 4 : 3)
.alignSelf(ItemAlign.Start)
... ...