import request from '@/utils/request'

// 查询company列表
export function listCompany(query) {
  request.defaults.baseURL = '/ezhizao-yzbh-entrust'
  return request({
    url: '/business/company/list',
    method: 'get',
    params: query
  })
}

// 查询company详细
export function getCompany(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-entrust'
  return request({
    url: '/business/company/' + id,
    method: 'get'
  })
}

// 新增company
export function addCompany(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-entrust'
  return request({
    url: '/business/company',
    method: 'post',
    data: data
  })
}

// 修改company
export function updateCompany(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-entrust'
  return request({
    url: '/business/company',
    method: 'put',
    data: data
  })
}

// 删除company
export function delCompany(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-entrust'
  return request({
    url: '/business/company/' + id,
    method: 'delete'
  })
}
