Showing
1 changed file
with
10 additions
and
1 deletions
| @@ -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) { |
-
Please register or login to post a comment