陈剑华

fix: 20118 【生产环境】进入热点-查看卡片,多了专题 标签和“2024年中非合作论坛峰会”,ios 不展示,只展示图片

... ... @@ -66,7 +66,7 @@ export struct Card5Component {
)
.height(this.loadImg ? '' : 114)
.autoResize(true)
if (this.contentDTO.titleShow == 1 || this.contentDTO.titleShow == null) {
if (this.titleShowPolicy == 1) {
Row()
.borderRadius(
{
... ... @@ -85,50 +85,52 @@ export struct Card5Component {
})
Row() {
Stack() {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType,objectLevel:this.contentDTO.objectLevel }).height(20).align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
}
if (this.contentDTO.top === 1) {
Notes({ newTags: '置顶' }).height(20).align(Alignment.Center)
if (this.titleShowPolicy == 1 && this.contentDTO.newsTitle) {
Stack() {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType,objectLevel:this.contentDTO.objectLevel }).height(20).align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
}
if (this.contentDTO.top === 1) {
Notes({ newTags: '置顶' }).height(20).align(Alignment.Center)
}
}
}
Text() {
Text() {
if (this.titleMarked) {
ForEach(this.textArr, (textItem: textItem) => {
if (textItem.isRed) {
Span(textItem.content)
.fontColor(0xED2800)
} else {
Span(textItem.content)
}
})
} else {
Span(this.contentDTO.newsTitle)
ForEach(this.textArr, (textItem: textItem) => {
if (textItem.isRed) {
Span(textItem.content)
.fontColor(0xED2800)
} else {
Span(textItem.content)
}
})
} else {
Span(this.contentDTO.newsTitle)
}
}
}
.width(CommonConstants.FULL_WIDTH)
.fontColor(Color.White)
.fontSize($r('app.float.font_size_18'))
.maxLines(2)
.align(Alignment.TopStart)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
.textIndent(
getNotesContentWidth(
this.contentDTO.seoTags || this.contentDTO.newTags,
this.contentDTO.objectType,
this.contentDTO.objectLevel,
this.contentDTO.top
.width(CommonConstants.FULL_WIDTH)
.fontColor(Color.White)
.fontSize($r('app.float.font_size_18'))
.maxLines(2)
.align(Alignment.TopStart)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
.textIndent(
getNotesContentWidth(
this.contentDTO.seoTags || this.contentDTO.newTags,
this.contentDTO.objectType,
this.contentDTO.objectLevel,
this.contentDTO.top
)
)
)
}.alignContent(Alignment.TopStart)
}.alignContent(Alignment.TopStart)
}
}
.justifyContent(FlexAlign.Start)
.margin({ left: 12, bottom: 10, right: 12 })
... ...