douaojie

fix: 头图卡问题调整,缺省图颜色

@@ -38,9 +38,9 @@ export struct Card11Component { @@ -38,9 +38,9 @@ export struct Card11Component {
38 Column() { 38 Column() {
39 Stack() { 39 Stack() {
40 if (this.contentDTO.newTags) { 40 if (this.contentDTO.newTags) {
41 - Notes({ newTags: this.contentDTO.newTags }) 41 + Notes({ newTags: this.contentDTO.newTags }).height(27).align(Alignment.Center)
42 } else if (this.contentDTO.objectType == '5') { 42 } else if (this.contentDTO.objectType == '5') {
43 - Notes({ objectType: this.contentDTO.objectType }) 43 + Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center)
44 } 44 }
45 Text() { 45 Text() {
46 if (this.titleMarked) { 46 if (this.titleMarked) {
@@ -52,6 +52,7 @@ export struct Card11Component { @@ -52,6 +52,7 @@ export struct Card11Component {
52 Span(this.contentDTO.newsTitle) 52 Span(this.contentDTO.newsTitle)
53 } 53 }
54 } 54 }
  55 + .lineHeight(27)
55 .fontSize($r("app.float.font_size_18")) 56 .fontSize($r("app.float.font_size_18"))
56 .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222")) 57 .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
57 .maxLines(3) 58 .maxLines(3)
@@ -59,7 +60,7 @@ export struct Card11Component { @@ -59,7 +60,7 @@ export struct Card11Component {
59 .width(CommonConstants.FULL_WIDTH) 60 .width(CommonConstants.FULL_WIDTH)
60 .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 : 61 .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
61 (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) || 62 (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
62 - this.contentDTO.objectType == '5' ? 30 : 0) 63 + this.contentDTO.objectType == '5' ? 35 : 0)
63 64
64 }.alignContent(Alignment.TopStart) 65 }.alignContent(Alignment.TopStart)
65 66
@@ -49,7 +49,7 @@ export struct Card17Component { @@ -49,7 +49,7 @@ export struct Card17Component {
49 } 49 }
50 } 50 }
51 .textOverflow({ overflow: TextOverflow.Ellipsis }) 51 .textOverflow({ overflow: TextOverflow.Ellipsis })
52 - .fontSize($r('app.float.font_size_18')) 52 + .fontSize($r('app.float.font_size_17'))
53 .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222')) 53 .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
54 .lineHeight(25) 54 .lineHeight(25)
55 .maxLines(3) 55 .maxLines(3)
@@ -120,7 +120,7 @@ export struct Card17Component { @@ -120,7 +120,7 @@ export struct Card17Component {
120 }) 120 })
121 121
122 // 评论等信息 122 // 评论等信息
123 - CardSourceInfo({compDTO:this.compDTO, contentDTO: this.contentDTO }) 123 + CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
124 } 124 }
125 .width(CommonConstants.FULL_WIDTH) 125 .width(CommonConstants.FULL_WIDTH)
126 .padding({ 126 .padding({
@@ -131,11 +131,3 @@ export struct Card17Component { @@ -131,11 +131,3 @@ export struct Card17Component {
131 }) 131 })
132 } 132 }
133 } 133 }
134 -  
135 -// 全局公共样式  
136 -@Styles  
137 -function ImageSize() {  
138 - .padding({ right: 18, left: 18 })  
139 - .width('100%')  
140 - .margin({ top: 10 })  
141 -}  
@@ -36,9 +36,9 @@ export struct Card3Component { @@ -36,9 +36,9 @@ export struct Card3Component {
36 Column() { 36 Column() {
37 Stack() { 37 Stack() {
38 if (this.contentDTO.newTags) { 38 if (this.contentDTO.newTags) {
39 - Notes({ newTags: this.contentDTO.newTags }) 39 + Notes({ newTags: this.contentDTO.newTags }).height(27).align(Alignment.Center)
40 } else if (this.contentDTO.objectType == '5') { 40 } else if (this.contentDTO.objectType == '5') {
41 - Notes({ objectType: this.contentDTO.objectType }) 41 + Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center)
42 } 42 }
43 Text() { 43 Text() {
44 if (this.titleMarked) { 44 if (this.titleMarked) {
@@ -56,11 +56,11 @@ export struct Card3Component { @@ -56,11 +56,11 @@ export struct Card3Component {
56 .width(CommonConstants.FULL_WIDTH) 56 .width(CommonConstants.FULL_WIDTH)
57 .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 : 57 .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
58 (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) || 58 (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
59 - this.contentDTO.objectType == '5' ? 30 : 0) 59 + this.contentDTO.objectType == '5' ? 35 : 0)
60 }.alignContent(Alignment.TopStart) 60 }.alignContent(Alignment.TopStart)
61 61
62 // 评论等信息 62 // 评论等信息
63 - CardSourceInfo({compDTO:this.compDTO, contentDTO: this.contentDTO }) 63 + CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
64 } 64 }
65 .width(CommonConstants.FULL_WIDTH) 65 .width(CommonConstants.FULL_WIDTH)
66 .padding({ 66 .padding({
@@ -72,13 +72,12 @@ export struct Card5Component { @@ -72,13 +72,12 @@ export struct Card5Component {
72 .width(CommonConstants.FULL_WIDTH) 72 .width(CommonConstants.FULL_WIDTH)
73 .fontColor(Color.White) 73 .fontColor(Color.White)
74 .fontSize($r('app.float.font_size_18')) 74 .fontSize($r('app.float.font_size_18'))
75 - .fontWeight(FontWeight.Bold)  
76 .maxLines(2) 75 .maxLines(2)
77 .align(Alignment.TopStart) 76 .align(Alignment.TopStart)
78 .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 77 .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
79 .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 : 78 .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
80 (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) || 79 (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
81 - this.contentDTO.objectType == '5' ? 30 : 0) 80 + this.contentDTO.objectType == '5' ? 35 : 0)
82 }.alignContent(Alignment.TopStart) 81 }.alignContent(Alignment.TopStart)
83 } 82 }
84 .justifyContent(FlexAlign.Start) 83 .justifyContent(FlexAlign.Start)
@@ -88,12 +87,12 @@ export struct Card5Component { @@ -88,12 +87,12 @@ export struct Card5Component {
88 } 87 }
89 .alignContent(Alignment.Bottom) 88 .alignContent(Alignment.Bottom)
90 .width(CommonConstants.FULL_WIDTH) 89 .width(CommonConstants.FULL_WIDTH)
91 - .padding({  
92 - left: $r('app.float.card_comp_pagePadding_lf'),  
93 - right: $r('app.float.card_comp_pagePadding_lf'),  
94 - top: $r('app.float.card_comp_pagePadding_tb'),  
95 - bottom: $r('app.float.card_comp_pagePadding_tb')  
96 - }) 90 + // .padding({
  91 + // left: $r('app.float.card_comp_pagePadding_lf'),
  92 + // right: $r('app.float.card_comp_pagePadding_lf'),
  93 + // top: $r('app.float.card_comp_pagePadding_tb'),
  94 + // bottom: $r('app.float.card_comp_pagePadding_tb')
  95 + // })
97 .onClick((event: ClickEvent) => { 96 .onClick((event: ClickEvent) => {
98 this.clicked = true; 97 this.clicked = true;
99 ProcessUtils.processPage(this.contentDTO) 98 ProcessUtils.processPage(this.contentDTO)
@@ -75,10 +75,10 @@ export struct Card6Component { @@ -75,10 +75,10 @@ export struct Card6Component {
75 .fontWeight(FontWeight.Normal) 75 .fontWeight(FontWeight.Normal)
76 .maxLines(3) 76 .maxLines(3)
77 .alignSelf(ItemAlign.Start) 77 .alignSelf(ItemAlign.Start)
78 - .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 78 + .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
79 .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 : 79 .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
80 (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) || 80 (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
81 - this.contentDTO.objectType == '5' ? 30 : 0) 81 + this.contentDTO.objectType == '5' ? 35 : 0)
82 }.alignContent(Alignment.TopStart) 82 }.alignContent(Alignment.TopStart)
83 83
84 } 84 }
@@ -86,7 +86,7 @@ export struct Card6Component { @@ -86,7 +86,7 @@ export struct Card6Component {
86 86
87 87
88 //bottom 评论等信息 88 //bottom 评论等信息
89 - CardSourceInfo({ compDTO: this.compDTO,contentDTO:this.contentDTO }) 89 + CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
90 } 90 }
91 .alignItems(HorizontalAlign.Start) 91 .alignItems(HorizontalAlign.Start)
92 .justifyContent(FlexAlign.Start) 92 .justifyContent(FlexAlign.Start)
@@ -38,11 +38,6 @@ export struct Card9Component { @@ -38,11 +38,6 @@ export struct Card9Component {
38 Column() { 38 Column() {
39 // 顶部标题,最多两行 39 // 顶部标题,最多两行
40 if (this.contentDTO.titleShow === 1 && this.contentDTO.newsTitle) { 40 if (this.contentDTO.titleShow === 1 && this.contentDTO.newsTitle) {
41 - if (this.contentDTO.newTags) {  
42 - Notes({ newTags: this.contentDTO.newTags })  
43 - } else if (this.contentDTO.objectType == '5') {  
44 - Notes({ objectType: this.contentDTO.objectType })  
45 - }  
46 Text() { 41 Text() {
47 if (this.titleMarked) { 42 if (this.titleMarked) {
48 Span(this.str01) 43 Span(this.str01)
@@ -56,14 +51,9 @@ export struct Card9Component { @@ -56,14 +51,9 @@ export struct Card9Component {
56 .fontColor(this.clicked ? 0x848484 : 0x222222) 51 .fontColor(this.clicked ? 0x848484 : 0x222222)
57 .width(CommonConstants.FULL_WIDTH) 52 .width(CommonConstants.FULL_WIDTH)
58 .fontSize($r('app.float.font_size_18')) 53 .fontSize($r('app.float.font_size_18'))
59 - .fontWeight(600)  
60 .maxLines(2) 54 .maxLines(2)
61 .textOverflow({ overflow: TextOverflow.Ellipsis }) 55 .textOverflow({ overflow: TextOverflow.Ellipsis })
62 - .margin({ bottom: 19 })  
63 - .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :  
64 - (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||  
65 - this.contentDTO.objectType == '5' ? 30 : 0)  
66 - 56 + .margin({ top: 10, bottom: 10 })
67 } 57 }
68 // 大图 58 // 大图
69 Stack() { 59 Stack() {