import request from '@/utils/request'

// 查询访客白名单列表
export function listWhitelist(query) {
  return request({
    url: '/base/whitelist/list',
    method: 'get',
    params: query
  })
}

// 查询访客白名单详细
export function getWhitelist(id) {
  return request({
    url: '/base/whitelist/' + id,
    method: 'get'
  })
}

// 新增访客白名单
export function addWhitelist(data) {
  return request({
    url: '/base/whitelist',
    method: 'post',
    data: data
  })
}

// 修改访客白名单
export function updateWhitelist(data) {
  return request({
    url: '/base/whitelist',
    method: 'put',
    data: data
  })
}

// 删除访客白名单
export function delWhitelist(id) {
  return request({
    url: '/base/whitelist/' + id,
    method: 'delete'
  })
}
