import Http from "@/utils/http";
// 获取列表
export const getListHttp = (params) => {
    return Http.post("/api/lists", params);
};

// 操作-点赞
export const operateLikeHttp = (query) => {
    return Http.postV2("https://api.gter.net/v2/api/forum/postTopicLike", query);
};

// 数据操作 - 收藏
export const operateCollectHttp = (query) => {
    return Http.postV2("https://api.gter.net/v2/api/forum/postTopicCollect", 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.get("https://api.gter.net/v2/api/forum/getCommentList", query);
};

// 详情数据 - 获取子评论数据
export const detailsChildCommentListHttp = (query) => {
    return Http.postV2("https://api.gter.net/v2/api/forum/childrenList", query);
};

// 详情数据 - 提交评论
export const detailsSubmitommentListHttp = (query) => {
    return Http.postV2("https://api.gter.net/v2/api/forum/postComment", query);
};

// 详情数据 - 提交评论
export const commentsEditSubmit = (query) => {
    return Http.postV2("https://api.gter.net/v2/api/forum/postCommentEdit", query);
};

// 评论相关 - 评论点赞
export const detailsLikeCommentHttp = (query) => {
    return Http.postV2("https://api.gter.net/v2/api/forum/likeComment", 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 publishProjectSearchHttp = (query) => {
    return Http.get("https://api.gter.net/v1/program/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);
};

export const reportHttp = (query) => {
    return Http.postV2("https://api.gter.net/v2/api/forum/postTopicReport", query);
};

export const commentReportHttp = (query) => {
    return Http.postV2("https://api.gter.net/v2/api/forum/postCommentReport", query);
};

// 评论相关 - 上传图片
export const commonUploadHttp = (url, query) => Http.postV2(url, query);

export const commonUploadConfigHttp = (query) => Http.post("https://api.gter.net/v1/config/upload?type=comment", 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);
};

// 回应相关 - 回应列表
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 mjHideHttp = (query) => {
    return Http.post("/api/details/interviewExperienceHide", query);
};

// 评论相关 - 删除评论
export const commentDeleteHttp = (query) => {
    return Http.postV2("https://api.gter.net/v2/api/forum/deleteComment", query);
};

// 详情数据 - 投票详情
export const topicDetailHttp = (query) => {
    return Http.get("https://api.gter.net/v2/api/forum/getTopicDetails", query);
};

export const topicRecommendHttp = (query) => {
    return Http.postV2("https://api.gter.net/v2/api/forum/setTopicRecommend", query);
};

export const topicEssenceHttp = (query) => {
    return Http.postV2("https://api.gter.net/v2/api/forum/setTopicBest", query);
};

export const topicDeleteHttp = (query) => {
    return Http.del("https://api.gter.net/v2/api/forum/deleteTopic", query);
};

export const topicHideHttp = (query) => {
    return Http.postV2("https://api.gter.net/v2/api/forum/setTopicHide", query);
};

export const topicgetOperationHttp = (query) => {
    return Http.postV2("https://api.gter.net/v2/api/forum/getTopicOperation", query);
};

export const getWConfigHttp = (query) => {
    return Http.get("https://api.gter.net/v2/api/config/website", query);
};


export const getQrcodeHttp = (query) => {
    return Http.get("https://api.gter.net/v2/api/forum/getQrcode", query);
};