PC-mj/composables/api.js
A1300399510 bb91a032e9
2024-01-05 18:20:39 +08:00

114 lines
3.0 KiB
JavaScript

import Http from "@/utils/http";
// 获取列表
export const getListHttp = params => {
return Http.post("/api/lists", params)
}
// 操作-点赞
export const operateLikeHttp = query => {
return Http.post("/api/operate/like", query)
}
// 数据操作 - 收藏
export const operateCollectHttp = query => {
return Http.post("/api/operate/collect", query)
}
// 详情数据 - 相关列表,同院校面经列表
export const relatedlistHttp = query => {
return Http.post("/api/details/relatedlist", query)
}
// 详情数据 - 面经详情
export const detailsHttp = query => {
return Http.post("/api/details", query)
}
// 详情数据 - 获取评论数据
export const detailsCommentListHttp = query => {
return Http.post("/api/comment/lists", 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 detailsLikeCommentHttp = query => {
return Http.post("/api/comment/like", query)
}
// 发布相关 - 发布问题初始化,编辑
export const publishInitHttp = query => {
return Http.post("/api/publish", query)
}
// 发布相关 - 发布问题搜索学校
export const publishSchoolSearchHttp = query => {
return Http.get("/api/publish/schoolSearch", query)
}
// 发布相关 - 发布问题搜索专业
export const publishProfessionSearchHttp = query => {
return Http.get("/api/publish/professionSearch", 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 MyUserInfoHttp = query => {
return Http.post("/api/user", query)
}
// 我的 - 我的发布的面经
export const MyUserPublishHttp = query => {
return Http.post("/api/user/publish", 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/operate/report", query)
}
// 数据操作 - 获取投币配置,我的寄托币数量
export const coinHttp = query => {
return Http.post("/api/operate/coin", query)
}
// 数据操作 - 投币
export const coinsubmitHttp = query => {
return Http.post("/api/operate/coinsubmit", query)
}
// 数据操作 - 投币排行榜
export const coinrankingHttp = query => {
return Http.post("/api/operate/coinranking", query)
}
// 数据操作 - 转发分享统计
export const shareHttp = query => {
return Http.post("/api/operate/share", query)
}