zhangwenqiang

fix:[17891]点赞样式设置-祈福或默哀,详情页点赞后,数字不应为红色

@@ -117,7 +117,8 @@ export struct ImageAndTextPageComponent { @@ -117,7 +117,8 @@ export struct ImageAndTextPageComponent {
117 if (this.likeNum > 0) { 117 if (this.likeNum > 0) {
118 Text(NumberFormatterUtils.formatNumberWithWan(this.likeNum)) 118 Text(NumberFormatterUtils.formatNumberWithWan(this.likeNum))
119 .fontSize(16) 119 .fontSize(16)
120 - .fontColor(this.newsStatusOfUser?.likeStatus == '1' ? '#ED2800' : '#999999') 120 + //.fontColor(this.newsStatusOfUser?.likeStatus == '1' ? '#ED2800' : '#999999')
  121 + .fontColor((this.likeNumTextColor()))
121 .fontFamily('PingFang SC-Regular') 122 .fontFamily('PingFang SC-Regular')
122 .fontWeight(400) 123 .fontWeight(400)
123 .margin({ left: 5 }) 124 .margin({ left: 5 })
@@ -267,6 +268,14 @@ export struct ImageAndTextPageComponent { @@ -267,6 +268,14 @@ export struct ImageAndTextPageComponent {
267 .backgroundColor(Color.White) 268 .backgroundColor(Color.White)
268 } 269 }
269 270
  271 + private likeNumTextColor() {
  272 + if(this.newsStatusOfUser?.likeStatus == '1'){
  273 + //已点赞状态 祈福和默哀为黑色 其余为红色
  274 + return (this.contentDetailData?.likesStyle == 2 || this.contentDetailData?.likesStyle == 3) ? '#222222' : '#ED2800'
  275 + }
  276 + return '#999999'
  277 + }
  278 +
270 private async getDetail() { 279 private async getDetail() {
271 this.isNetConnected = NetworkUtil.isNetConnected() 280 this.isNetConnected = NetworkUtil.isNetConnected()
272 if (!this.isNetConnected) { 281 if (!this.isNetConnected) {