gree_leran/apis/comments.js

28 lines
542 B
JavaScript
Raw Normal View History

2024-06-22 07:20:39 +00:00
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,
})
}