import type * as T from './type'; import http from '@/utils/http'; const BASE_URL = '/post'; /** * 添加岗位 */ export function addPost(data: T.PostAddReq) { return http.post(BASE_URL, data); } /** * 查询岗位详情 */ export function getPostDetail(postId: string) { return http.get(`${BASE_URL}/detail/${postId}`); } /** * 查询岗位列表 */ export function listPost(params?: T.PostPageQuery) { return http.get(`${BASE_URL}/list`, params); } /** * 分页查询岗位列表 */ export function pagePost(params?: T.PostPageQuery) { return http.get>(`${BASE_URL}/page`, params); } /** * 修改岗位 */ export function updatePost(postId: string, data: T.PostUpdateReq) { return http.put(`${BASE_URL}/${postId}`, data); } /** * 删除岗位 */ export function deletePost(postId: string) { return http.del(`${BASE_URL}/${postId}`); }