import Http from "@/utils/http"
// 投票, 数据列表 - 列表
export const getListHttp = params => {
    return Http.post("/api/lists", params)
}

// 详情数据 - 投票详情
export const detailsHttp = query => {
    return Http.post("/api/details", query)
}

// 详情数据 - 获取评论数据
export const commentListHttp = params => {
    return Http.post("/api/comment/lists", params)
}

// 评论相关 - 评论点赞
export const detailsLikeCommentHttp = query => {
    return Http.post("/api/comment/like", query)
}

// 详情数据 - 获取子评论数据
export const detailsChildCommentListHttp = query => {
    return Http.post("/api/comment/childrenList", query)
}

// 详情数据 - 提交评论
export const detailsSubmitommentListHttp = query => {
    return Http.post("/api/comment/submit", query)
}

// 详情数据 - 提交评论
export const commentsEditSubmit = query => {
    return Http.post("/api/comment/commentsEditSubmit", query)
}

// 发布相关 - 发布问题初始化,编辑
export const publishInitHttp = query => {
    return Http.post("/api/publish", query)
}

// 发布相关 - 提交
export const publishSubmitHttp = query => {
    return Http.post("/api/publish/submit", query)
}

// 发布相关 - 更改匿名状态
export const changeAnonymousHttp = query => {
    return Http.post("/api/publish/changeAnonymous", query)
}

// 发布相关 - 删除投票
export const deleteHttp = query => {
    return Http.post("/api/publish/delete", query)
}

// 操作-点赞
export const operateLikeHttp = query => {
    return Http.post("/api/operate/like", query)
}

// 数据操作 - 收藏
export const operateCollectHttp = query => {
    return Http.post("/api/operate/collect", query)
}

// 数据操作 - 投票操作
export const operationCollectHttp = query => {
    return Http.post("/api/operate/operation", query)
}

// 数据操作 - 取消投票操作
export const unvoteCollectHttp = query => {
    return Http.post("/api/operate/unvote", query)
}

// 我的 - 用户信息
export const MyUserInfoHttp = query => {
    return Http.post("/api/user", query)
}

// 我的 - 我的发布的投票
export const MyUserPublishHttp = query => {
    return Http.post("/api/user/publish", query)
}

// 我的 - 用户相关 - 我参与
export const MyUserTakevoteHttp = query => {
    return Http.post("/api/user/takevote", query)
}

// 我的 - 删除收藏
export const MyUserDeleteCollectHttp = query => {
    return Http.post("/api/user/deleteCollect", query)
}

// 数据操作 - 收藏
export const MyUserCollectHttp = query => {
    return Http.post("/api/user/collect", query)
}

// 评论相关 - 举报 Comment related
export const commentReportHttp = query => {
    return Http.post("/api/comment/report", query)
}

// 回应相关 - 回应列表
export const getRiposteHttp = query => {
    return Http.post("/api/riposte/riposteGet", query)
}

// 回应相关 - 回应提交
export const riposteSubmitHttp = query => {
    return Http.post("/api/riposte/riposteSubmit", query)
}

// 回应相关 - 回应详情
export const riposteDetailHttp = query => {
    return Http.post("/api/riposte/riposteDetail", query)
}

// 评论相关 - 上传图片
export const commonUploadHttp = query => {
    return Http.post("https://oss.gter.net/upload/base64", query)
}

// 评论相关 - 删除评论
export const commentDeleteHttp = query => {
    return Http.post("/api/comment/commentDelete", query)
}
