import request from '@/utils/request'

// 查询代理商考核列表
export function listTarget(query) {
  return request({
    url: '/user/target/list',
    method: 'get',
    params: query
  })
}

// 查询代理商考核详细
export function getTarget(targetId) {
  return request({
    url: '/user/target/' + targetId,
    method: 'get'
  })
}
// 查询代理商考核详细
export function getInfoByQuery(query) {
  return request({
    url: '/user/target/getInfoByQuery',
    method: 'get',
    params: query
  })
}

// 新增代理商考核
export function addTarget(data) {
  return request({
    url: '/user/target',
    method: 'post',
    data: data
  })
}

// 修改代理商考核
export function updateTarget(data) {
  return request({
    url: '/user/target',
    method: 'put',
    data: data
  })
}
// 新增、修改代理商考核
export function addOrEdit(data) {
  return request({
    url: '/user/target/addOrEdit',
    method: 'post',
    data: data
  })
}

// 删除代理商考核
export function delTarget(targetId) {
  return request({
    url: '/user/target/' + targetId,
    method: 'delete'
  })
}
