gree_leran/apis/comments.js

28 lines
542 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import {http} from "../utils/http.js"
/**
* 根据id获取评论
*/
export const getCommentsByRelatedPostId= (relatedPostId) => {
return http({
url:"/api/comments/getCommentsByContentId2",
method:"GET",
data:{
relatedPostId,
},
})
}
/**
* 添加评论
* data:
* relatedPostId案例id
* replyUserId:回复用户id没有为空
* parentCommentId回复评论id||null
* commentContent内容
*/
export const addComments=(data)=>{
return http({
url:"/api/comments/addComments",
method:"POST",
data,
})
}