合并
Change-Id: I19ca58c58a513cba20c162c9ed7cbab90e060bf6
diff --git a/src/api/helpComment.js b/src/api/helpComment.js
index e711587..c1d00c0 100644
--- a/src/api/helpComment.js
+++ b/src/api/helpComment.js
@@ -9,5 +9,20 @@
};
export const addCommentReply = (commentId, replyData) => {
- return api.post(`/help/comments/${commentId}/replies`, replyData);
+ const formData = new FormData();
+ formData.append('authorId', replyData.authorId);
+ formData.append('content', replyData.content);
+
+ // 如果有图片,添加到formData
+ if (replyData.image) {
+ formData.append('image', replyData.image);
+ }
+
+ return api.post(`/help/comments/${commentId}/replies`, formData);
+};
+
+export const deleteComment = (commentId, authorId) => {
+ return api.delete(`/help/comments/${commentId}`, {
+ params: { authorId }
+ });
};
\ No newline at end of file