xugenyuan

ref |> 处理自己发的评论预显不可以点赞

Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
... ... @@ -546,6 +546,7 @@ struct commentFooterView {
})
}
if (this.item.id) { // 审核通过的才显示点赞
Row({ space: 6 }) {
Text(this.item.likeNum)
.fontColor($r('app.color.color_666666'))
... ... @@ -556,9 +557,18 @@ struct commentFooterView {
width: 16,
height: 16
})
}
.onClick(() => {
this.clickLike()
})
}
}
.justifyContent(FlexAlign.SpaceBetween)
.width('100%')
.height(30)
}
clickLike() {
// 未登录,跳转登录
const user_id = HttpUtils.getUserId()
if (!user_id) {
... ... @@ -570,12 +580,6 @@ struct commentFooterView {
}).catch(() => {
commentLikeChange(this.item)
})
})
}
.justifyContent(FlexAlign.SpaceBetween)
.width('100%')
.height(30)
}
}
... ...