import request from '@/utils/request'

// 分页查询租户配置列表
export function pageListConfig(query) {
  return request({
    url: '/tenant/config/pageList',
    method: 'get',
    params: query
  })
}

// 查询租户配置列表
export function listConfig(query) {
  return request({
    url: '/tenant/config/list',
    method: 'get',
    params: query
  })
}

// 查询租户配置详细
export function getConfig(id) {
  return request({
    url: '/tenant/config/' + id,
    method: 'get'
  })
}

// 新增租户配置
export function addConfig(data) {
  return request({
    url: '/tenant/config',
    method: 'post',
    data: data
  })
}

// 修改租户配置
export function updateConfig(data) {
  return request({
    url: '/tenant/config',
    method: 'put',
    data: data
  })
}

// 删除租户配置
export function delConfig(id) {
  return request({
    url: '/tenant/config/' + id,
    method: 'delete'
  })
}

// 租户logo上传
export function uploadLogo(data) {
  return request({
    url: '/tenant/config/logo',
    method: 'post',
    data: data
  })
}