import request from '@/utils/request'

// 查询vip卡列表
export function listBusiCards(query) {
  return request({
    url: '/voluntary/busiCards/list',
    method: 'get',
    params: query
  })
}

// 查询vip卡详细
export function getBusiCards(cardId) {
  return request({
    url: '/voluntary/busiCards/' + cardId,
    method: 'get'
  })
}

// 新增vip卡
export function addBusiCards(data) {
  return request({
    url: '/voluntary/busiCards',
    method: 'post',
    data: data
  })
}

// 修改vip卡
export function updateBusiCards(data) {
  return request({
    url: '/voluntary/busiCards',
    method: 'put',
    data: data
  })
}
//批量操作
export function batchUpdate(data) {
  return request({ url: '/voluntary/busiCards/batch', method: 'post', data: data })
}

// 删除vip卡
export function delBusiCards(cardId) {
  return request({
    url: '/voluntary/busiCards/' + cardId,
    method: 'delete'
  })
}

// 分配卡
export function distributionCards(data) {
  return request({
    url: '/voluntary/busiCards/distribution',
    method: 'post',
    data: data
  })
}


// 按代理商统计数据
export function staticByAgent(data) {
  return request({ url: '/voluntary/busiCards/static/agent', method: 'post', data: data })
}

// 批量注册
export function batchRegisterCards(params) {
  return request({
    url: '/mock/registerCard2',
    method: 'get',
    params
  })
}

export function getExamTypes(params) {
  return request({
    url: '/getExamTypes',
    method: 'get',
    autoFitNoToken: true,
    params
  })
}

export function getExamMajorsNoToken(params) {
  return request({
    url: '/getExamMajorsNoToken',
    method: 'get',
    autoFitNoToken: true,
    params
  })
}
