douaojie

fix: 添加标签

@@ -35,7 +35,9 @@ export struct Card11Component { @@ -35,7 +35,9 @@ export struct Card11Component {
35 build() { 35 build() {
36 Column() { 36 Column() {
37 Stack() { 37 Stack() {
38 - if (this.contentDTO.objectType == '5') { 38 + if (this.contentDTO.newTags) {
  39 + Notes({ newTags: this.contentDTO.newTags })
  40 + } else if (this.contentDTO.objectType == '5') {
39 Notes({ objectType: this.contentDTO.objectType }) 41 Notes({ objectType: this.contentDTO.objectType })
40 } 42 }
41 Text() { 43 Text() {
@@ -48,12 +50,14 @@ export struct Card11Component { @@ -48,12 +50,14 @@ export struct Card11Component {
48 Span(this.contentDTO.newsTitle) 50 Span(this.contentDTO.newsTitle)
49 } 51 }
50 } 52 }
51 - .fontSize($r("app.float.font_size_16"))  
52 - .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))  
53 - .maxLines(3)  
54 - .textOverflow({ overflow: TextOverflow.Ellipsis })  
55 - .width(CommonConstants.FULL_WIDTH)  
56 - .textIndent(this.contentDTO.objectType == '5' ? 35 : 0) 53 + .fontSize($r("app.float.font_size_16"))
  54 + .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
  55 + .maxLines(3)
  56 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  57 + .width(CommonConstants.FULL_WIDTH)
  58 + .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
  59 + (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
  60 + this.contentDTO.objectType == '5' ? 30 : 0)
57 61
58 }.alignContent(Alignment.TopStart) 62 }.alignContent(Alignment.TopStart)
59 63
@@ -34,7 +34,9 @@ export struct Card3Component { @@ -34,7 +34,9 @@ export struct Card3Component {
34 build() { 34 build() {
35 Column() { 35 Column() {
36 Stack() { 36 Stack() {
37 - if (this.contentDTO.objectType == '5') { 37 + if (this.contentDTO.newTags) {
  38 + Notes({ newTags: this.contentDTO.newTags })
  39 + } else if (this.contentDTO.objectType == '5') {
38 Notes({ objectType: this.contentDTO.objectType }) 40 Notes({ objectType: this.contentDTO.objectType })
39 } 41 }
40 Text() { 42 Text() {
@@ -47,10 +49,12 @@ export struct Card3Component { @@ -47,10 +49,12 @@ export struct Card3Component {
47 Span(this.contentDTO.newsTitle) 49 Span(this.contentDTO.newsTitle)
48 } 50 }
49 } 51 }
50 - .fontSize($r("app.float.font_size_16"))  
51 - .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))  
52 - .width(CommonConstants.FULL_WIDTH)  
53 - .textIndent(this.contentDTO.objectType == '5' ? 35 : 0) 52 + .fontSize($r("app.float.font_size_16"))
  53 + .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
  54 + .width(CommonConstants.FULL_WIDTH)
  55 + .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
  56 + (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
  57 + this.contentDTO.objectType == '5' ? 30 : 0)
54 }.alignContent(Alignment.TopStart) 58 }.alignContent(Alignment.TopStart)
55 59
56 // 评论等信息 60 // 评论等信息
@@ -53,7 +53,9 @@ export struct Card5Component { @@ -53,7 +53,9 @@ export struct Card5Component {
53 }) 53 })
54 Row() { 54 Row() {
55 Stack() { 55 Stack() {
56 - if (this.contentDTO.objectType == '5') { 56 + if (this.contentDTO.newTags) {
  57 + Notes({ newTags: this.contentDTO.newTags })
  58 + } else if (this.contentDTO.objectType == '5') {
57 Notes({ objectType: this.contentDTO.objectType }) 59 Notes({ objectType: this.contentDTO.objectType })
58 } 60 }
59 61
@@ -67,13 +69,15 @@ export struct Card5Component { @@ -67,13 +69,15 @@ export struct Card5Component {
67 Span(this.contentDTO.newsTitle) 69 Span(this.contentDTO.newsTitle)
68 } 70 }
69 } 71 }
70 - .width(CommonConstants.FULL_WIDTH)  
71 - .fontColor(Color.White)  
72 - .fontSize($r('app.float.normal_text_size'))  
73 - .fontWeight(FontWeight.Bold)  
74 - .maxLines(2)  
75 - .align(Alignment.TopStart)  
76 - .textIndent(this.contentDTO.objectType == '5' ? 35 : 0) 72 + .width(CommonConstants.FULL_WIDTH)
  73 + .fontColor(Color.White)
  74 + .fontSize($r('app.float.normal_text_size'))
  75 + .fontWeight(FontWeight.Bold)
  76 + .maxLines(2)
  77 + .align(Alignment.TopStart)
  78 + .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
  79 + (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
  80 + this.contentDTO.objectType == '5' ? 30 : 0)
77 }.alignContent(Alignment.TopStart) 81 }.alignContent(Alignment.TopStart)
78 } 82 }
79 .justifyContent(FlexAlign.Start) 83 .justifyContent(FlexAlign.Start)