| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- /**
- * 评论接口
- * @see https://api.halo.run/content-api.html#tag/post-controller
- */
- import HttpHandler from '@/common/http/request.js'
- export default {
- /**
- * 获取评论列表接口(树形数据)
- * @param {String} postId 文章id
- * @param {Object} params 查询参数
- */
- getPostCommentTree: (postId, params) => {
- return HttpHandler.Get(`/api/content/posts/${postId}/comments/tree_view`, params)
- },
- /**
- * 获取评论列表接口(列表数据)
- * @param {String} postId 文章id
- * @param {Object} params 查询参数
- */
- getPostCommentList: (postId, params) => {
- return HttpHandler.Get(`/api/content/posts/${postId}/comments/list_view`, params)
- },
- /**
- * 获取置顶评论
- * @param {String} postId 文章id
- * @param {Object} params 查询参数
- */
- getPostTopCommentList: (postId, params) => {
- return HttpHandler.Get(`/api/content/posts/${postId}/comments/top_view`, params)
- },
- /**
- * 获取评论的子评论列表
- * @param {String} postId 文章id
- * @param {String} commentParentId 要获取的评论id
- * @param {Object} params 查询参数
- */
- getPostChildrenCommentList: (postId, commentParentId, params) => {
- return HttpHandler.Get(`/api/content/posts/${postId}/comments/${commentParentId}/children`, params)
- },
- }
|