xugenyuan

ref |> 处理自己发布的评论,未审核不能进行回复评论

Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
... ... @@ -318,14 +318,7 @@ struct ChildCommentItem {
})
.margin({ left: 95, right: 16, top: -5 })
.onClick(() => {
this.publishCommentModel.rootCommentId = this.item.rootCommentId
this.publishCommentModel.parentId = this.item.id
this.publishCommentModel.placeHolderText = '回复' + this.item.fromUserName + ':'
if (this.dialogController != null) {
this.dialogController.open()
}
this.replyComment()
})
... ... @@ -337,6 +330,17 @@ struct ChildCommentItem {
}.alignItems(HorizontalAlign.Start)
.width('100%')
}
replyComment() {
if (this.item.id && this.item.checkStatus == '2') { // 审核通过的才显示回复
this.publishCommentModel.rootCommentId = this.item.rootCommentId
this.publishCommentModel.parentId = this.item.id
this.publishCommentModel.placeHolderText = '回复' + this.item.fromUserName + ':'
if (this.dialogController != null) {
this.dialogController.open()
}
}
}
}
... ... @@ -486,12 +490,7 @@ struct commentHeaderView {
})
.margin({ left: 59, right: 16, top: -5 })
.onClick(() => {
this.publishCommentModel.rootCommentId = this.item.rootCommentId
this.publishCommentModel.parentId = this.item.id
this.publishCommentModel.placeHolderText = '回复' + this.item.fromUserName + ':'
if (this.dialogController != null) {
this.dialogController.open()
}
this.replyComment()
})
commentFooterView({
... ... @@ -501,6 +500,17 @@ struct commentHeaderView {
}).margin({ left: 59, right: 16 })
}.alignItems(HorizontalAlign.Start)
}
replyComment() {
if (this.item.id && this.item.checkStatus == '2') { // 审核通过的才显示回复
this.publishCommentModel.rootCommentId = this.item.rootCommentId
this.publishCommentModel.parentId = this.item.id
this.publishCommentModel.placeHolderText = '回复' + this.item.fromUserName + ':'
if (this.dialogController != null) {
this.dialogController.open()
}
}
}
}
/*评论内容下面的IP地址时间点赞*/
... ... @@ -538,12 +548,7 @@ struct commentFooterView {
.fontColor($r('app.color.color_222222'))
.fontSize(12)
.onClick(() => {
this.publishCommentModel.rootCommentId = this.item.rootCommentId
this.publishCommentModel.parentId = this.item.id
this.publishCommentModel.placeHolderText = '回复' + this.item.fromUserName + ':'
if (this.dialogController != null) {
this.dialogController.open()
}
this.replyComment()
})
}
}
... ... @@ -570,6 +575,17 @@ struct commentFooterView {
.height(30)
}
replyComment() {
if (this.item.id && this.item.checkStatus == '2') { // 审核通过的才显示回复
this.publishCommentModel.rootCommentId = this.item.rootCommentId
this.publishCommentModel.parentId = this.item.id
this.publishCommentModel.placeHolderText = '回复' + this.item.fromUserName + ':'
if (this.dialogController != null) {
this.dialogController.open()
}
}
}
clickLike() {
// 未登录,跳转登录
const user_id = HttpUtils.getUserId()
... ...