douaojie

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

@@ -38,6 +38,8 @@ export struct Card6Component { @@ -38,6 +38,8 @@ export struct Card6Component {
38 Stack() { 38 Stack() {
39 if (this.contentDTO.newTags) { 39 if (this.contentDTO.newTags) {
40 Notes({ newTags: this.contentDTO.newTags }) 40 Notes({ newTags: this.contentDTO.newTags })
  41 + } else if (this.contentDTO.objectType == '5') {
  42 + Notes({ objectType: this.contentDTO.objectType })
41 } 43 }
42 44
43 Text(`${this.contentDTO.newsTitle}`) 45 Text(`${this.contentDTO.newsTitle}`)
@@ -48,7 +50,8 @@ export struct Card6Component { @@ -48,7 +50,8 @@ export struct Card6Component {
48 .alignSelf(ItemAlign.Start) 50 .alignSelf(ItemAlign.Start)
49 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 51 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
50 .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 60 : 52 .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 60 :
51 - this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length < 3 ? 30 : 0) 53 + (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
  54 + this.contentDTO.objectType == '5' ? 30 : 0)
52 }.alignContent(Alignment.TopStart) 55 }.alignContent(Alignment.TopStart)
53 56
54 }.height("80%") 57 }.height("80%")
@@ -64,7 +67,7 @@ export struct Card6Component { @@ -64,7 +67,7 @@ export struct Card6Component {
64 67
65 Stack() { 68 Stack() {
66 Image(this.loadImg ? this.contentDTO.coverUrl : '') 69 Image(this.loadImg ? this.contentDTO.coverUrl : '')
67 - .backgroundColor( this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5) 70 + .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5)
68 .borderRadius(5) 71 .borderRadius(5)
69 .aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4) 72 .aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4)
70 .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 90 : 180) 73 .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 90 : 180)
@@ -136,13 +136,13 @@ export struct Card9Component { @@ -136,13 +136,13 @@ export struct Card9Component {
136 .textOverflow({ overflow: TextOverflow.Ellipsis }) 136 .textOverflow({ overflow: TextOverflow.Ellipsis })
137 .alignSelf(ItemAlign.Center) 137 .alignSelf(ItemAlign.Center)
138 .margin({ left: 12 }) 138 .margin({ left: 12 })
139 - if (item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url) {  
140 - Image(this.loadImg? item.fullColumnImgUrls[0].url : '')  
141 - .backgroundColor(0xf5f5f5)  
142 - .width(90)  
143 - .height(60)  
144 - .borderRadius($r('app.float.image_border_radius'))  
145 - } 139 + // if (item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url) {
  140 + // Image(this.loadImg? item.fullColumnImgUrls[0].url : '')
  141 + // .backgroundColor(0xf5f5f5)
  142 + // .width(90)
  143 + // .height(60)
  144 + // .borderRadius($r('app.float.image_border_radius'))
  145 + // }
146 } 146 }
147 } 147 }
148 } 148 }