Showing
1 changed file
with
7 additions
and
35 deletions
| @@ -100,12 +100,6 @@ export struct CardSourceInfo { | @@ -100,12 +100,6 @@ export struct CardSourceInfo { | ||
| 100 | return flag; | 100 | return flag; |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | - showCommentNum() { | ||
| 104 | - const curRouter = router.getState().name; | ||
| 105 | - // return curRouter !== 'PeopleShipHomePage' | ||
| 106 | - return true | ||
| 107 | - } | ||
| 108 | - | ||
| 109 | /** | 103 | /** |
| 110 | * 全域数字显示规则 | 104 | * 全域数字显示规则 |
| 111 | * 1、当数量为千位以內时,显示数字,不保留小数点,比如 4585 | 105 | * 1、当数量为千位以內时,显示数字,不保留小数点,比如 4585 |
| @@ -150,25 +144,12 @@ export struct CardSourceInfo { | @@ -150,25 +144,12 @@ export struct CardSourceInfo { | ||
| 150 | } | 144 | } |
| 151 | 145 | ||
| 152 | showDot() { | 146 | showDot() { |
| 153 | - // return (this.showTime() && (this.contentDTO.rmhPlatform === 1 || this.contentDTO.source)) || ((this.contentDTO.rmhPlatform === 1 && this.contentDTO.rmhInfo?.rmhName && | ||
| 154 | - // this.contentDTO.rmhInfo?.rmhName != '') || (this.contentDTO.source && this.contentDTO.source != '')) && | ||
| 155 | - // (this.getContentDtoBean()?.interactData?.commentNum | ||
| 156 | - // // || DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)) != '' | ||
| 157 | - // || (this.contentDTO.isSearch || this.contentDTO.isCollection || | ||
| 158 | - // !this.contentDTO.isSearch && DateTimeUtils.getCommentTime | ||
| 159 | - // (Number | ||
| 160 | - // .parseFloat(this | ||
| 161 | - // .contentDTO.publishTime)) | ||
| 162 | - // .indexOf | ||
| 163 | - // ('-') === -1) | ||
| 164 | - // ) | ||
| 165 | let flag = false; | 147 | let flag = false; |
| 166 | if (this.contentDTO.rmhPlatform === 1 || this.contentDTO.source) { | 148 | if (this.contentDTO.rmhPlatform === 1 || this.contentDTO.source) { |
| 167 | if (this.showTime() && !this.isEllipsisActive) { | 149 | if (this.showTime() && !this.isEllipsisActive) { |
| 168 | flag = true | 150 | flag = true |
| 169 | } else if (!this.isEllipsisActive) { | 151 | } else if (!this.isEllipsisActive) { |
| 170 | - if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 && | ||
| 171 | - this.showCommentNum()) { | 152 | + if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0) { |
| 172 | flag = true; | 153 | flag = true; |
| 173 | } else if (this.contentDTO.objectType !=='2' && this.isCompInnerSource && this.contentDTO.interactData && this.contentDTO.interactData?.commentNum > 0) { | 154 | } else if (this.contentDTO.objectType !=='2' && this.isCompInnerSource && this.contentDTO.interactData && this.contentDTO.interactData?.commentNum > 0) { |
| 174 | flag = true; | 155 | flag = true; |
| @@ -271,10 +252,8 @@ export struct CardSourceInfo { | @@ -271,10 +252,8 @@ export struct CardSourceInfo { | ||
| 271 | } | 252 | } |
| 272 | 253 | ||
| 273 | // 评论数 | 254 | // 评论数 |
| 274 | - // if (!this.contentDTO.cornerMark && !this.contentDTO.corner && !this.isEllipsisActive) { | ||
| 275 | if (!this.isEllipsisActive) { | 255 | if (!this.isEllipsisActive) { |
| 276 | - if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 && | ||
| 277 | - this.showCommentNum()) { | 256 | + if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0) { |
| 278 | Text(`${this.handlerNum(this.getContentDtoBean()?.interactData?.commentNum.toString())}评`) | 257 | Text(`${this.handlerNum(this.getContentDtoBean()?.interactData?.commentNum.toString())}评`) |
| 279 | .fontSize(12) | 258 | .fontSize(12) |
| 280 | .fontColor($r("app.color.color_B0B0B0")) | 259 | .fontColor($r("app.color.color_B0B0B0")) |
| @@ -328,17 +307,11 @@ export struct CardSourceInfo { | @@ -328,17 +307,11 @@ export struct CardSourceInfo { | ||
| 328 | * @returns | 307 | * @returns |
| 329 | */ | 308 | */ |
| 330 | private getContentDtoBean(): ContentDTO { | 309 | private getContentDtoBean(): ContentDTO { |
| 331 | - let content = new ContentDTO | ||
| 332 | - if (this.compDTO == undefined) { | ||
| 333 | - content = this.contentDTO | ||
| 334 | - } | ||
| 335 | - if (this.compDTO.operDataList.length == 0) { | ||
| 336 | - content = this.contentDTO | ||
| 337 | - } | ||
| 338 | - if (!content) { | ||
| 339 | - content = this.compDTO.operDataList[0] | 310 | + if (this.compDTO.operDataList.length > 0) { |
| 311 | + return this.compDTO.operDataList[0] | ||
| 312 | + } else { | ||
| 313 | + return this.contentDTO | ||
| 340 | } | 314 | } |
| 341 | - return content; | ||
| 342 | } | 315 | } |
| 343 | 316 | ||
| 344 | /** | 317 | /** |
| @@ -366,8 +339,7 @@ export struct CardSourceInfo { | @@ -366,8 +339,7 @@ export struct CardSourceInfo { | ||
| 366 | } | 339 | } |
| 367 | 340 | ||
| 368 | // 评论数 | 341 | // 评论数 |
| 369 | - if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 && | ||
| 370 | - this.showCommentNum()) { | 342 | + if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0) { |
| 371 | have = true | 343 | have = true |
| 372 | } else { | 344 | } else { |
| 373 | if (this.contentDTO.objectType !=='2' && this.isCompInnerSource && this.contentDTO.interactData && this.contentDTO.interactData?.commentNum > 0) { | 345 | if (this.contentDTO.objectType !=='2' && this.isCompInnerSource && this.contentDTO.interactData && this.contentDTO.interactData?.commentNum > 0) { |
-
Please register or login to post a comment