douaojie

fix: 人民号单图卡和轮播图卡添加标签

... ... @@ -38,6 +38,8 @@ export struct Card6Component {
Stack() {
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags })
} else if (this.contentDTO.objectType == '5') {
Notes({ objectType: this.contentDTO.objectType })
}
Text(`${this.contentDTO.newsTitle}`)
... ... @@ -48,7 +50,8 @@ export struct Card6Component {
.alignSelf(ItemAlign.Start)
.textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
.textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 60 :
this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length < 3 ? 30 : 0)
(this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
this.contentDTO.objectType == '5' ? 30 : 0)
}.alignContent(Alignment.TopStart)
}.height("80%")
... ... @@ -64,7 +67,7 @@ export struct Card6Component {
Stack() {
Image(this.loadImg ? this.contentDTO.coverUrl : '')
.backgroundColor( this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5)
.backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5)
.borderRadius(5)
.aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4)
.height(this.contentDTO.appStyle === CompStyle.Card_13 ? 90 : 180)
... ...
... ... @@ -136,13 +136,13 @@ export struct Card9Component {
.textOverflow({ overflow: TextOverflow.Ellipsis })
.alignSelf(ItemAlign.Center)
.margin({ left: 12 })
if (item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url) {
Image(this.loadImg? item.fullColumnImgUrls[0].url : '')
.backgroundColor(0xf5f5f5)
.width(90)
.height(60)
.borderRadius($r('app.float.image_border_radius'))
}
// if (item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url) {
// Image(this.loadImg? item.fullColumnImgUrls[0].url : '')
// .backgroundColor(0xf5f5f5)
// .width(90)
// .height(60)
// .borderRadius($r('app.float.image_border_radius'))
// }
}
}
}
... ...