Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
xugenyuan
2024-05-09 10:49:18 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e0c46970cbfb7c7107807dfaad9e72b107cef85c
e0c46970
1 parent
1f31a88d
ref |> 处理自己发布的评论,未审核不能进行回复评论
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
20 deletions
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
View file @
e0c4697
...
...
@@ -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()
...
...
Please
register
or
login
to post a comment