diff --git a/components/comment-section/index.vue b/components/comment-section/index.vue index 1d15083..385b692 100644 --- a/components/comment-section/index.vue +++ b/components/comment-section/index.vue @@ -82,7 +82,7 @@ // 发表评论 const handleCreateComment = async () => { - const res = await createComment({ relationId: props.relationId, content: commentContent.value, projectId: props.projectId, type: props.projectId ? 1 : 2 }) + const res = await createComment({ relationId: props.relationId, content: commentContent.value, projectId: props.projectId || props.relationId, type: props.projectId ? 1 : 2 }) if (res.code === 0) { commentContent.value = '' query.value.pageNo = 1