陈剑华

fix: 19041 单图卡-标签和标题间距过大、标题和封面图间距过大

@@ -32,6 +32,9 @@ export struct Card10Component { @@ -32,6 +32,9 @@ export struct Card10Component {
32 @State isBatchData: boolean = false 32 @State isBatchData: boolean = false
33 33
34 async aboutToAppear(): Promise<void> { 34 async aboutToAppear(): Promise<void> {
  35 + console.log('Card10Component-compDTO', JSON.stringify(this.compDTO))
  36 + console.log('Card10Component-contentDTO', JSON.stringify(this.contentDTO))
  37 +
35 this.titleInit(); 38 this.titleInit();
36 this.loadImg = await onlyWifiLoadImg(); 39 this.loadImg = await onlyWifiLoadImg();
37 this.initHideDetail(); 40 this.initHideDetail();
@@ -41,7 +41,7 @@ export struct Card11Component { @@ -41,7 +41,7 @@ export struct Card11Component {
41 Column() { 41 Column() {
42 Stack() { 42 Stack() {
43 if(this.contentDTO.objectType == '5'){ 43 if(this.contentDTO.objectType == '5'){
44 - Notes({ objectType: this.contentDTO.objectType }).height(28).align(Alignment.Center) 44 + Notes({ objectType: this.contentDTO.objectType, }).height(28).align(Alignment.Center)
45 } else { 45 } else {
46 if (this.contentDTO.seoTags) { 46 if (this.contentDTO.seoTags) {
47 Notes({ newTags: this.contentDTO.seoTags }).height(28).align(Alignment.Center) 47 Notes({ newTags: this.contentDTO.seoTags }).height(28).align(Alignment.Center)
@@ -77,7 +77,6 @@ export struct Card11Component { @@ -77,7 +77,6 @@ export struct Card11Component {
77 (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 : 77 (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
78 ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5' || this.contentDTO.top === 1) ? 35 : 78 ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5' || this.contentDTO.top === 1) ? 35 :
79 0 ) 79 0 )
80 -  
81 }.alignContent(Alignment.TopStart) 80 }.alignContent(Alignment.TopStart)
82 81
83 82
@@ -48,20 +48,6 @@ export struct Card2Component { @@ -48,20 +48,6 @@ export struct Card2Component {
48 Column() { 48 Column() {
49 Column() { 49 Column() {
50 Stack() { 50 Stack() {
51 - // if(this.contentDTO.objectType == '5'){  
52 - // Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center)  
53 - // }else if(this.contentDTO.objectType == '2'){  
54 - // if(this.contentDTO.seoTags){  
55 - // Notes({ newTags: this.contentDTO.seoTags }).height(30).align(Alignment.Center)  
56 - // }else if(this.contentDTO.newTags){  
57 - // Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)  
58 - //  
59 - // }  
60 - // }else {  
61 - // if(this.contentDTO.newTags){  
62 - // Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)  
63 - // }  
64 - // }  
65 if(this.contentDTO.objectType == '5'){ 51 if(this.contentDTO.objectType == '5'){
66 Notes({ objectType: this.contentDTO.objectType }).height(29).align(Alignment.Center) 52 Notes({ objectType: this.contentDTO.objectType }).height(29).align(Alignment.Center)
67 } else { 53 } else {
@@ -75,14 +61,6 @@ export struct Card2Component { @@ -75,14 +61,6 @@ export struct Card2Component {
75 Notes({ newTags: '置顶' }).height(29).align(Alignment.Center) 61 Notes({ newTags: '置顶' }).height(29).align(Alignment.Center)
76 } 62 }
77 } 63 }
78 - //新闻标题  
79 - // if (this.contentDTO.newTags) {  
80 - //  
81 - // //Notes({ newTags: this.contentDTO.newTags })  
82 - // } else if (this.contentDTO.objectType == '5') {  
83 - //  
84 - // //Notes({ objectType: this.contentDTO.objectType })  
85 - // }  
86 64
87 Text() { 65 Text() {
88 if (this.titleMarked) { 66 if (this.titleMarked) {
@@ -108,6 +86,7 @@ export struct Card2Component { @@ -108,6 +86,7 @@ export struct Card2Component {
108 (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 : 86 (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
109 ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5' || this.contentDTO.top === 1) ? 35 : 87 ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5' || this.contentDTO.top === 1) ? 35 :
110 0 ) 88 0 )
  89 + .width('100%')
111 }.alignContent(Alignment.TopStart) 90 }.alignContent(Alignment.TopStart)
112 91
113 //.textIndent(this.contentDTO.objectType == '5' ? 35 : 0) 92 //.textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
@@ -38,11 +38,6 @@ export struct Card3Component { @@ -38,11 +38,6 @@ export struct Card3Component {
38 build() { 38 build() {
39 Column() { 39 Column() {
40 Stack() { 40 Stack() {
41 - // if (this.contentDTO.newTags) {  
42 - // Notes({ newTags: this.contentDTO.newTags }).height(27).align(Alignment.Center)  
43 - // } else if (this.contentDTO.objectType == '5') {  
44 - // Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center)  
45 - // }  
46 if(this.contentDTO.objectType == '5'){ 41 if(this.contentDTO.objectType == '5'){
47 Notes({ objectType: this.contentDTO.objectType }).height(29).align(Alignment.Center) 42 Notes({ objectType: this.contentDTO.objectType }).height(29).align(Alignment.Center)
48 } else { 43 } else {
@@ -84,6 +84,7 @@ export struct Card4Component { @@ -84,6 +84,7 @@ export struct Card4Component {
84 (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 : 84 (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
85 ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5' || this.contentDTO.top === 1) ? 35 : 85 ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5' || this.contentDTO.top === 1) ? 35 :
86 0 ) 86 0 )
  87 + .width('100%')
87 }.alignContent(Alignment.TopStart) 88 }.alignContent(Alignment.TopStart)
88 //新闻标题 89 //新闻标题
89 90
@@ -227,10 +227,6 @@ struct CarouselLayout01CardView { @@ -227,10 +227,6 @@ struct CarouselLayout01CardView {
227 Notes({ newTags: this.item.newTags }) 227 Notes({ newTags: this.item.newTags })
228 } 228 }
229 } 229 }
230 - // if (this.item.objectType == '5' || this.item.objectType == '6') {  
231 - // Notes({ objectType: this.item.objectType })  
232 - // }  
233 - //Text(`${this.item.corner}${this.item.newsTitle}`)  
234 Text(`${this.item.newsTitle}`) 230 Text(`${this.item.newsTitle}`)
235 .width(CommonConstants.FULL_PARENT) 231 .width(CommonConstants.FULL_PARENT)
236 .fontColor(Color.White) 232 .fontColor(Color.White)