import request from '@/utils/request'

// 查询证书管理列表
export function listCertificate(query) {
  return request({
    url: '/exam/certificate/list',
    method: 'get',
    params: query
  })
}

// 查询证书下拉框
export function certificateOption(data) {
  return request({
    url: '/exam/certificate/queryOption',
    method: 'post',
    data: data
  })
}

// 查询证书管理详细
export function getCertificate(id) {
  return request({
    url: '/exam/certificate/' + id,
    method: 'get'
  })
}

// 新增证书管理
export function addCertificate(data) {
  return request({
    url: '/exam/certificate',
    method: 'post',
    data: data
  })
}

// 修改证书管理
export function updateCertificate(data) {
  return request({
    url: '/exam/certificate',
    method: 'put',
    data: data
  })
}

// 删除证书管理
export function delCertificate(id) {
  return request({
    url: '/exam/certificate/' + id,
    method: 'delete'
  })
}
