From 0dc2c2f0c31e175c2bfc38ca4aacbd2ca93f38b3 Mon Sep 17 00:00:00 2001 From: zzc <1761997216@qq.com> Date: Mon, 8 Jun 2026 19:08:39 +0800 Subject: [PATCH] fix: rating --- src/api/rating/topicOperate.js | 13 ++ src/api/system/robot.js | 2 +- .../components/RecordCommentLikeEdit.vue | 134 ++++++++++++++++++ src/views/rating/topicCommentRecord/index.vue | 13 +- 4 files changed, 160 insertions(+), 2 deletions(-) create mode 100644 src/views/rating/topicCommentRecord/components/RecordCommentLikeEdit.vue diff --git a/src/api/rating/topicOperate.js b/src/api/rating/topicOperate.js index 4eadfd8..8e28562 100644 --- a/src/api/rating/topicOperate.js +++ b/src/api/rating/topicOperate.js @@ -52,3 +52,16 @@ export function comment(data) { data, }) } + +/** + * 评论点赞 + * @param {*} { commentId, userId } + * @returns + */ +export function commentLike(data) { + return request({ + url: 'management/api/rating/topicItemOperate/comment/like', + method: 'post', + data, + }) +} diff --git a/src/api/system/robot.js b/src/api/system/robot.js index ce1a72a..bb33111 100644 --- a/src/api/system/robot.js +++ b/src/api/system/robot.js @@ -9,7 +9,7 @@ export function getList(data) { } /** - * 获取机器人列表(基础信息) {appId, pageNo, pageSize, topicId, itemId} + * 获取机器人列表(基础信息) {appId, pageNo, pageSize, topicId, itemId, commentId?} * @param {*} data * @returns */ diff --git a/src/views/rating/topicCommentRecord/components/RecordCommentLikeEdit.vue b/src/views/rating/topicCommentRecord/components/RecordCommentLikeEdit.vue new file mode 100644 index 0000000..da72ae7 --- /dev/null +++ b/src/views/rating/topicCommentRecord/components/RecordCommentLikeEdit.vue @@ -0,0 +1,134 @@ + + + + + + + + + {{ item.nickname || '未知用户' }} + + + + + + + + + + + diff --git a/src/views/rating/topicCommentRecord/index.vue b/src/views/rating/topicCommentRecord/index.vue index 9f4ac81..b8385f7 100644 --- a/src/views/rating/topicCommentRecord/index.vue +++ b/src/views/rating/topicCommentRecord/index.vue @@ -83,6 +83,12 @@ + + + 点赞 + + + @@ -165,6 +171,7 @@ /> + @@ -176,10 +183,11 @@ import { formatTime } from '@/utils' import { getThumbUrl } from '@/utils/blessing' import RecordCommentEdit from './components/RecordCommentEdit' + import RecordCommentLikeEdit from './components/RecordCommentLikeEdit' export default { name: 'RatingTopicCommentIndex', - components: { RecordCommentEdit }, + components: { RecordCommentEdit, RecordCommentLikeEdit }, directives: { loadmore: { bind(el, binding) { @@ -340,6 +348,9 @@ }, // -- 列表数据加载 -- + handleLike(row) { + this.$refs['likeEdit'].showEdit(row) + }, handleCommentNow() { this.$refs['commentEdit'].showEdit() },