Showing
1 changed file
with
8 additions
and
5 deletions
| @@ -64,11 +64,13 @@ export struct CardSourceInfo { | @@ -64,11 +64,13 @@ export struct CardSourceInfo { | ||
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | handleTimeStr() { | 66 | handleTimeStr() { |
| 67 | - return DateTimeUtils.getCommentTime( | 67 | + let str = DateTimeUtils.getCommentTime( |
| 68 | this.contentDTO.publishTime.includes(' ') | 68 | this.contentDTO.publishTime.includes(' ') |
| 69 | ? Number.parseFloat(new Date(this.contentDTO.publishTime).getTime().toString()) | 69 | ? Number.parseFloat(new Date(this.contentDTO.publishTime).getTime().toString()) |
| 70 | : Number.parseFloat(this.contentDTO.publishTime) | 70 | : Number.parseFloat(this.contentDTO.publishTime) |
| 71 | ) | 71 | ) |
| 72 | + console.log('cj2024 str', str) | ||
| 73 | + return str | ||
| 72 | } | 74 | } |
| 73 | 75 | ||
| 74 | showTime() { | 76 | showTime() { |
| @@ -80,6 +82,7 @@ export struct CardSourceInfo { | @@ -80,6 +82,7 @@ export struct CardSourceInfo { | ||
| 80 | let flag: boolean = false; | 82 | let flag: boolean = false; |
| 81 | if (curRouter === 'MainPage') { | 83 | if (curRouter === 'MainPage') { |
| 82 | if (this.isTwoDaysAgo(publishTime)) { | 84 | if (this.isTwoDaysAgo(publishTime)) { |
| 85 | + console.log('cj2024 isTwoDaysAgo', this.isTwoDaysAgo(publishTime)) | ||
| 83 | flag = false | 86 | flag = false |
| 84 | } else { | 87 | } else { |
| 85 | flag = true; | 88 | flag = true; |
| @@ -87,6 +90,7 @@ export struct CardSourceInfo { | @@ -87,6 +90,7 @@ export struct CardSourceInfo { | ||
| 87 | } else { | 90 | } else { |
| 88 | flag = true; | 91 | flag = true; |
| 89 | } | 92 | } |
| 93 | + console.log('cj2024 flag', flag) | ||
| 90 | return flag; | 94 | return flag; |
| 91 | } | 95 | } |
| 92 | 96 | ||
| @@ -156,8 +160,7 @@ export struct CardSourceInfo { | @@ -156,8 +160,7 @@ export struct CardSourceInfo { | ||
| 156 | } | 160 | } |
| 157 | 161 | ||
| 158 | // 点 | 162 | // 点 |
| 159 | - if (this.showTime()) { | ||
| 160 | - if (((this.contentDTO.rmhPlatform === 1 || this.contentDTO.source)) || ((this.contentDTO.rmhPlatform === 1 && this.contentDTO.rmhInfo?.rmhName && | 163 | + if ((this.showTime() && (this.contentDTO.rmhPlatform === 1 || this.contentDTO.source)) || ((this.contentDTO.rmhPlatform === 1 && this.contentDTO.rmhInfo?.rmhName && |
| 161 | this.contentDTO.rmhInfo?.rmhName != '') || (this.contentDTO.source && this.contentDTO.source != '')) && | 164 | this.contentDTO.rmhInfo?.rmhName != '') || (this.contentDTO.source && this.contentDTO.source != '')) && |
| 162 | (this.getContentDtoBean()?.interactData?.commentNum | 165 | (this.getContentDtoBean()?.interactData?.commentNum |
| 163 | // || DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)) != '' | 166 | // || DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)) != '' |
| @@ -176,7 +179,6 @@ export struct CardSourceInfo { | @@ -176,7 +179,6 @@ export struct CardSourceInfo { | ||
| 176 | .visibility(!this.isEllipsisActive ? Visibility.Visible : Visibility.Hidden) | 179 | .visibility(!this.isEllipsisActive ? Visibility.Visible : Visibility.Hidden) |
| 177 | 180 | ||
| 178 | } | 181 | } |
| 179 | - } | ||
| 180 | 182 | ||
| 181 | // 发布日期 | 183 | // 发布日期 |
| 182 | if (this.showTime()) { | 184 | if (this.showTime()) { |
| @@ -189,7 +191,8 @@ export struct CardSourceInfo { | @@ -189,7 +191,8 @@ export struct CardSourceInfo { | ||
| 189 | } | 191 | } |
| 190 | 192 | ||
| 191 | // 评论数 | 193 | // 评论数 |
| 192 | - if (!this.contentDTO.cornerMark && !this.contentDTO.corner && !this.isEllipsisActive) { | 194 | + // if (!this.contentDTO.cornerMark && !this.contentDTO.corner && !this.isEllipsisActive) { |
| 195 | + if (!this.isEllipsisActive) { | ||
| 193 | if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 && | 196 | if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 && |
| 194 | this.showCommentNum()) { | 197 | this.showCommentNum()) { |
| 195 | Text(`${this.handlerNum(this.getContentDtoBean()?.interactData?.commentNum.toString())}评`) | 198 | Text(`${this.handlerNum(this.getContentDtoBean()?.interactData?.commentNum.toString())}评`) |
-
Please register or login to post a comment