Showing
1 changed file
with
33 additions
and
12 deletions
| @@ -139,6 +139,38 @@ export struct CardSourceInfo { | @@ -139,6 +139,38 @@ export struct CardSourceInfo { | ||
| 139 | return parseInt(date) < twoDaysAgo.getTime() | 139 | return parseInt(date) < twoDaysAgo.getTime() |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | + showDot() { | ||
| 143 | + // return (this.showTime() && (this.contentDTO.rmhPlatform === 1 || this.contentDTO.source)) || ((this.contentDTO.rmhPlatform === 1 && this.contentDTO.rmhInfo?.rmhName && | ||
| 144 | + // this.contentDTO.rmhInfo?.rmhName != '') || (this.contentDTO.source && this.contentDTO.source != '')) && | ||
| 145 | + // (this.getContentDtoBean()?.interactData?.commentNum | ||
| 146 | + // // || DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)) != '' | ||
| 147 | + // || (this.contentDTO.isSearch || this.contentDTO.isCollection || | ||
| 148 | + // !this.contentDTO.isSearch && DateTimeUtils.getCommentTime | ||
| 149 | + // (Number | ||
| 150 | + // .parseFloat(this | ||
| 151 | + // .contentDTO.publishTime)) | ||
| 152 | + // .indexOf | ||
| 153 | + // ('-') === -1) | ||
| 154 | + // ) | ||
| 155 | + let flag = false; | ||
| 156 | + if (this.contentDTO.rmhPlatform === 1 || this.contentDTO.source) { | ||
| 157 | + if (this.showTime() && !this.isEllipsisActive) { | ||
| 158 | + flag = true | ||
| 159 | + } else if (!this.isEllipsisActive) { | ||
| 160 | + if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 && | ||
| 161 | + this.showCommentNum()) { | ||
| 162 | + flag = true; | ||
| 163 | + } else if (this.contentDTO.objectType !=='2' && this.isCompInnerSource && this.contentDTO.interactData && this.contentDTO.interactData?.commentNum > 0) { | ||
| 164 | + flag = true; | ||
| 165 | + } | ||
| 166 | + } else if (this.contentDTO?.author&&this.contentDTO?.author.length > 0) { | ||
| 167 | + flag = true; | ||
| 168 | + } | ||
| 169 | + } | ||
| 170 | + | ||
| 171 | + return flag; | ||
| 172 | + } | ||
| 173 | + | ||
| 142 | build() { | 174 | build() { |
| 143 | Column(){ | 175 | Column(){ |
| 144 | Flex({ justifyContent: FlexAlign.Start, direction: FlexDirection.Row }) { | 176 | Flex({ justifyContent: FlexAlign.Start, direction: FlexDirection.Row }) { |
| @@ -161,18 +193,7 @@ export struct CardSourceInfo { | @@ -161,18 +193,7 @@ export struct CardSourceInfo { | ||
| 161 | } | 193 | } |
| 162 | 194 | ||
| 163 | // 点 | 195 | // 点 |
| 164 | - if ((this.showTime() && (this.contentDTO.rmhPlatform === 1 || this.contentDTO.source)) || ((this.contentDTO.rmhPlatform === 1 && this.contentDTO.rmhInfo?.rmhName && | ||
| 165 | - this.contentDTO.rmhInfo?.rmhName != '') || (this.contentDTO.source && this.contentDTO.source != '')) && | ||
| 166 | - (this.getContentDtoBean()?.interactData?.commentNum | ||
| 167 | - // || DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)) != '' | ||
| 168 | - || (this.contentDTO.isSearch || this.contentDTO.isCollection || | ||
| 169 | - !this.contentDTO.isSearch && DateTimeUtils.getCommentTime | ||
| 170 | - (Number | ||
| 171 | - .parseFloat(this | ||
| 172 | - .contentDTO.publishTime)) | ||
| 173 | - .indexOf | ||
| 174 | - ('-') === -1) | ||
| 175 | - )) { | 196 | + if (this.showDot()) { |
| 176 | 197 | ||
| 177 | Image($r("app.media.point")) | 198 | Image($r("app.media.point")) |
| 178 | .width(11) | 199 | .width(11) |
-
Please register or login to post a comment