28 lines
542 B
JavaScript
28 lines
542 B
JavaScript
|
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,
|
|||
|
})
|
|||
|
}
|