chenjun

19996 卡片来源显示规则,评论数未展示

... ... @@ -64,11 +64,13 @@ export struct CardSourceInfo {
}
handleTimeStr() {
return DateTimeUtils.getCommentTime(
let str = DateTimeUtils.getCommentTime(
this.contentDTO.publishTime.includes(' ')
? Number.parseFloat(new Date(this.contentDTO.publishTime).getTime().toString())
: Number.parseFloat(this.contentDTO.publishTime)
)
console.log('cj2024 str', str)
return str
}
showTime() {
... ... @@ -80,6 +82,7 @@ export struct CardSourceInfo {
let flag: boolean = false;
if (curRouter === 'MainPage') {
if (this.isTwoDaysAgo(publishTime)) {
console.log('cj2024 isTwoDaysAgo', this.isTwoDaysAgo(publishTime))
flag = false
} else {
flag = true;
... ... @@ -87,6 +90,7 @@ export struct CardSourceInfo {
} else {
flag = true;
}
console.log('cj2024 flag', flag)
return flag;
}
... ... @@ -156,8 +160,7 @@ export struct CardSourceInfo {
}
// 点
if (this.showTime()) {
if (((this.contentDTO.rmhPlatform === 1 || this.contentDTO.source)) || ((this.contentDTO.rmhPlatform === 1 && this.contentDTO.rmhInfo?.rmhName &&
if ((this.showTime() && (this.contentDTO.rmhPlatform === 1 || this.contentDTO.source)) || ((this.contentDTO.rmhPlatform === 1 && this.contentDTO.rmhInfo?.rmhName &&
this.contentDTO.rmhInfo?.rmhName != '') || (this.contentDTO.source && this.contentDTO.source != '')) &&
(this.getContentDtoBean()?.interactData?.commentNum
// || DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)) != ''
... ... @@ -176,7 +179,6 @@ export struct CardSourceInfo {
.visibility(!this.isEllipsisActive ? Visibility.Visible : Visibility.Hidden)
}
}
// 发布日期
if (this.showTime()) {
... ... @@ -189,7 +191,8 @@ export struct CardSourceInfo {
}
// 评论数
if (!this.contentDTO.cornerMark && !this.contentDTO.corner && !this.isEllipsisActive) {
// if (!this.contentDTO.cornerMark && !this.contentDTO.corner && !this.isEllipsisActive) {
if (!this.isEllipsisActive) {
if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 &&
this.showCommentNum()) {
Text(`${this.handlerNum(this.getContentDtoBean()?.interactData?.commentNum.toString())}评`)
... ...