import request from "../request";

// 查询我的工具列表
export function jobList(id, params) {
    return request({
        url: '/job/myIssueJob/' + id,
        method: 'get',
        params
    })
}

// 发布
export function fbStatus(id) {
    return request({
        url: '/job/issue/' + id,
        method: 'post',
    })
}
// 取消发布
export function qxfbStatus(id) {
    return request({
        url: '/job/cancelIssue/' + id,
        method: 'post',
    })
}
// 新增
export function addJob(data) {
    return request({
        url: '/job/addJob',
        method: 'post',
        data
    })
}
// 修改
export function editJob(data) {
    return request({
        url: '/job/editJob',
        method: 'post',
        data
    })
}
// 删除
export function deleteJob(id) {
    return request({
        url: '/job/' + id,
        method: 'delete',
    })
}

// 查看详情
export function jobDetailById(id) {
    return request({
        url: '/job/detail/' + id,
        method: 'get',
        headers: {
            isToken: false
        }
    })
}

// 查看已报名用户
export function jobHuntDetail(id) {
    return request({
        url: '/job/myHuntJobs/' + id,
        method: 'get',
    })
}

// 下载简历
export function downloadPdf(id) {
    return request({
      url: '/personal/download/resume/' + id,
      method: 'get',
      responseType: 'blob',
    })
  }