import request from '@/utils/request'

// 查询企业列表
export function listEnterprise(query) {
  return request({
    url: '/goods/enterprise/list',
    method: 'get',
    params: query
  })
}

export function lists(data) {
  return request({
    url: '/goods/enterprise/lists',
    method: 'post',
    data
  })
}

// 查询企业详细
export function getEnterprise(id) {
  return request({
    url: '/goods/enterprise/' + id,
    method: 'get'
  })
}

// 新增企业
export function addEnterprise(data) {
  return request({
    url: '/goods/enterprise',
    method: 'post',
    data: data
  })
}

// 修改企业
export function updateEnterprise(data) {
  return request({
    url: '/goods/enterprise',
    method: 'put',
    data: data
  })
}

// 企业认证
export function authentication(id) {
  return request({
    url: '/goods/enterprise/authentication?id=' + id,
    method: 'post'
  })
}



// 删除企业
export function delEnterprise(id) {
  return request({
    url: '/goods/enterprise/enterprise/' + id,
    method: 'delete'
  })
}

export function sysUsers(data) {
  return request({
    url: '/goods/enterprise/sysUsers/',
    method: 'post',
    data
  })
}
// 选择服务
export function getLevel(id,serviceLevel) {
  return request({
    url: '/goods/enterprise/getLevel?id=' + id + "&&serviceLevel=" + serviceLevel,
    method: 'post'
  })
}
