import request from '@/utils/request'

// 查询企业租户列表
export function listInfo(query) {
  request.defaults.baseURL = '/ezhizao-yzbh-financial'
  return request({
    url: '/business/info/list',
    method: 'get',
    params: query
  })
}

export function getInfo(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-financial'
  return request({
    url: '/business/info/' + id,
    method: 'get'
  })
}
export function getInfoByTenantId() {
  request.defaults.baseURL = '/ezhizao-yzbh-financial'
  return request({
    url: '/business/info/tenantId',
    method: 'get'
  })
}
export function addInfo(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-nancial'
  return request({
    url: '/business/info',
    method: 'post',
    data: data
  })
}

export function updateInfo(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-financial'
  return request({
    url: '/business/info',
    method: 'put',
    data: data
  })
}

export function delInfo(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-financial'
  return request({
    url: '/business/info/' + id,
    method: 'delete'
  })
}
