ref |> 处理自己发布的评论,未审核不能进行回复评论
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Showing
1 changed file
with
36 additions
and
20 deletions
| @@ -318,14 +318,7 @@ struct ChildCommentItem { | @@ -318,14 +318,7 @@ struct ChildCommentItem { | ||
| 318 | }) | 318 | }) |
| 319 | .margin({ left: 95, right: 16, top: -5 }) | 319 | .margin({ left: 95, right: 16, top: -5 }) |
| 320 | .onClick(() => { | 320 | .onClick(() => { |
| 321 | - | ||
| 322 | - | ||
| 323 | - this.publishCommentModel.rootCommentId = this.item.rootCommentId | ||
| 324 | - this.publishCommentModel.parentId = this.item.id | ||
| 325 | - this.publishCommentModel.placeHolderText = '回复' + this.item.fromUserName + ':' | ||
| 326 | - if (this.dialogController != null) { | ||
| 327 | - this.dialogController.open() | ||
| 328 | - } | 321 | + this.replyComment() |
| 329 | }) | 322 | }) |
| 330 | 323 | ||
| 331 | 324 | ||
| @@ -337,6 +330,17 @@ struct ChildCommentItem { | @@ -337,6 +330,17 @@ struct ChildCommentItem { | ||
| 337 | }.alignItems(HorizontalAlign.Start) | 330 | }.alignItems(HorizontalAlign.Start) |
| 338 | .width('100%') | 331 | .width('100%') |
| 339 | } | 332 | } |
| 333 | + | ||
| 334 | + replyComment() { | ||
| 335 | + if (this.item.id && this.item.checkStatus == '2') { // 审核通过的才显示回复 | ||
| 336 | + this.publishCommentModel.rootCommentId = this.item.rootCommentId | ||
| 337 | + this.publishCommentModel.parentId = this.item.id | ||
| 338 | + this.publishCommentModel.placeHolderText = '回复' + this.item.fromUserName + ':' | ||
| 339 | + if (this.dialogController != null) { | ||
| 340 | + this.dialogController.open() | ||
| 341 | + } | ||
| 342 | + } | ||
| 343 | + } | ||
| 340 | } | 344 | } |
| 341 | 345 | ||
| 342 | 346 | ||
| @@ -486,12 +490,7 @@ struct commentHeaderView { | @@ -486,12 +490,7 @@ struct commentHeaderView { | ||
| 486 | }) | 490 | }) |
| 487 | .margin({ left: 59, right: 16, top: -5 }) | 491 | .margin({ left: 59, right: 16, top: -5 }) |
| 488 | .onClick(() => { | 492 | .onClick(() => { |
| 489 | - this.publishCommentModel.rootCommentId = this.item.rootCommentId | ||
| 490 | - this.publishCommentModel.parentId = this.item.id | ||
| 491 | - this.publishCommentModel.placeHolderText = '回复' + this.item.fromUserName + ':' | ||
| 492 | - if (this.dialogController != null) { | ||
| 493 | - this.dialogController.open() | ||
| 494 | - } | 493 | + this.replyComment() |
| 495 | }) | 494 | }) |
| 496 | 495 | ||
| 497 | commentFooterView({ | 496 | commentFooterView({ |
| @@ -501,6 +500,17 @@ struct commentHeaderView { | @@ -501,6 +500,17 @@ struct commentHeaderView { | ||
| 501 | }).margin({ left: 59, right: 16 }) | 500 | }).margin({ left: 59, right: 16 }) |
| 502 | }.alignItems(HorizontalAlign.Start) | 501 | }.alignItems(HorizontalAlign.Start) |
| 503 | } | 502 | } |
| 503 | + | ||
| 504 | + replyComment() { | ||
| 505 | + if (this.item.id && this.item.checkStatus == '2') { // 审核通过的才显示回复 | ||
| 506 | + this.publishCommentModel.rootCommentId = this.item.rootCommentId | ||
| 507 | + this.publishCommentModel.parentId = this.item.id | ||
| 508 | + this.publishCommentModel.placeHolderText = '回复' + this.item.fromUserName + ':' | ||
| 509 | + if (this.dialogController != null) { | ||
| 510 | + this.dialogController.open() | ||
| 511 | + } | ||
| 512 | + } | ||
| 513 | + } | ||
| 504 | } | 514 | } |
| 505 | 515 | ||
| 506 | /*评论内容下面的IP地址时间点赞*/ | 516 | /*评论内容下面的IP地址时间点赞*/ |
| @@ -538,12 +548,7 @@ struct commentFooterView { | @@ -538,12 +548,7 @@ struct commentFooterView { | ||
| 538 | .fontColor($r('app.color.color_222222')) | 548 | .fontColor($r('app.color.color_222222')) |
| 539 | .fontSize(12) | 549 | .fontSize(12) |
| 540 | .onClick(() => { | 550 | .onClick(() => { |
| 541 | - this.publishCommentModel.rootCommentId = this.item.rootCommentId | ||
| 542 | - this.publishCommentModel.parentId = this.item.id | ||
| 543 | - this.publishCommentModel.placeHolderText = '回复' + this.item.fromUserName + ':' | ||
| 544 | - if (this.dialogController != null) { | ||
| 545 | - this.dialogController.open() | ||
| 546 | - } | 551 | + this.replyComment() |
| 547 | }) | 552 | }) |
| 548 | } | 553 | } |
| 549 | } | 554 | } |
| @@ -570,6 +575,17 @@ struct commentFooterView { | @@ -570,6 +575,17 @@ struct commentFooterView { | ||
| 570 | .height(30) | 575 | .height(30) |
| 571 | } | 576 | } |
| 572 | 577 | ||
| 578 | + replyComment() { | ||
| 579 | + if (this.item.id && this.item.checkStatus == '2') { // 审核通过的才显示回复 | ||
| 580 | + this.publishCommentModel.rootCommentId = this.item.rootCommentId | ||
| 581 | + this.publishCommentModel.parentId = this.item.id | ||
| 582 | + this.publishCommentModel.placeHolderText = '回复' + this.item.fromUserName + ':' | ||
| 583 | + if (this.dialogController != null) { | ||
| 584 | + this.dialogController.open() | ||
| 585 | + } | ||
| 586 | + } | ||
| 587 | + } | ||
| 588 | + | ||
| 573 | clickLike() { | 589 | clickLike() { |
| 574 | // 未登录,跳转登录 | 590 | // 未登录,跳转登录 |
| 575 | const user_id = HttpUtils.getUserId() | 591 | const user_id = HttpUtils.getUserId() |
-
Please register or login to post a comment