PC-mj/composables/api.js

95 lines
2.5 KiB
JavaScript
Raw Normal View History

2023-12-18 03:12:07 +00:00
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)
}
2023-12-18 11:09:29 +00:00
// 数据操作 - 收藏
export const operateCollectHttp = query => {
return Http.post("/api/operate/collect", query)
}
2023-12-18 03:12:07 +00:00
// 详情数据 - 相关列表,同院校面经列表
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 => {
2023-12-18 11:09:29 +00:00
return Http.post("/api/comment/lists", query)
2023-12-18 03:12:07 +00:00
}
// 详情数据 - 获取子评论数据
export const detailsChildCommentListHttp = query => {
2023-12-25 10:39:49 +00:00
return Http.post("/api/comment/childrenList", query)
2023-12-18 03:12:07 +00:00
}
// 详情数据 - 提交评论
export const detailsSubmitommentListHttp = query => {
2023-12-25 10:39:49 +00:00
return Http.post("/api/comment/submit", query)
2023-12-18 03:12:07 +00:00
}
2023-12-29 10:37:38 +00:00
// 评论相关 - 评论点赞
export const detailsLikeCommentHttp = query => {
return Http.post("/api/comment/like", query)
}
2023-12-18 03:12:07 +00:00
// 发布相关 - 发布问题初始化,编辑
export const publishInitHttp = query => {
return Http.post("/api/publish", query)
2023-12-18 11:09:29 +00:00
}
2023-12-29 10:37:38 +00:00
// 发布相关 - 发布问题搜索学校
2023-12-25 10:39:49 +00:00
export const publishSchoolSearchHttp = query => {
2024-01-04 06:11:30 +00:00
return Http.get("/api/publish/schoolSearch", query)
2023-12-29 10:37:38 +00:00
}
// 发布相关 - 发布问题搜索专业
export const publishProfessionSearchHttp = query => {
2024-01-04 06:11:30 +00:00
return Http.get("/api/publish/professionSearch", query)
2023-12-29 10:37:38 +00:00
}
// 发布相关 - 提交
export const publishSubmitHttp = query => {
return Http.post("/api/publish/submit", query)
}
// 发布相关 - 更改匿名状态
export const changeAnonymousHttp = query => {
return Http.post("/api/publish/changeAnonymous", query)
2023-12-25 10:39:49 +00:00
}
2023-12-18 11:09:29 +00:00
// 我的 - 用户信息
export const MyUserInfoHttp = query => {
return Http.post("/api/user", query)
}
// 我的 - 我的发布的面经
export const MyUserPublishHttp = query => {
return Http.post("/api/user/publish", query)
2023-12-25 10:39:49 +00:00
}
2023-12-29 10:37:38 +00:00
// 我的 - 删除收藏
export const MyUserDeleteCollectHttp = query => {
return Http.post("/api/user/deleteCollect", query)
}
2023-12-25 10:39:49 +00:00
// 数据操作 - 收藏
export const MyUserCollectHttp = query => {
return Http.post("/api/user/collect", query)
2023-12-29 10:37:38 +00:00
}
// 评论相关 - 举报 Comment related
export const commentReportHttp = query => {
return Http.post("/api/operate/report", query)
}