PC-mj/composables/api.js
2023-12-25 18:39:49 +08:00

63 lines
1.7 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 publishInitHttp = query => {
return Http.post("/api/publish", query)
}
// 发布相关 - 发布问题初始化,编辑
export const publishSchoolSearchHttp = query => {
return Http.post("https://offer.gter.net/miniprogram/InterviewExperience/schoolSearch", query)
}
// 我的 - 用户信息
export const MyUserInfoHttp = query => {
return Http.post("/api/user", query)
}
// 我的 - 我的发布的面经
export const MyUserPublishHttp = query => {
return Http.post("/api/user/publish", query)
}
// 数据操作 - 收藏
export const MyUserCollectHttp = query => {
return Http.post("/api/user/collect", query)
}