import request from '@/utils/request'

// 分页查询访客预约信息列表
export function pageListBook(query) {
  return request({
    url: '/visit/book/pageList',
    method: 'get',
    params: query
  })
}

// 查询访客预约信息列表
export function listBook(query) {
  return request({
    url: '/visit/book/list',
    method: 'get',
    params: query
  })
}

// 查询访客预约信息详细
export function getBook(id) {
  return request({
    url: '/visit/book/' + id,
    method: 'get'
  })
}

// 新增访客预约信息
export function addBook(data) {
  return request({
    url: '/visit/book',
    method: 'post',
    data: data
  })
}

// 修改访客预约信息
export function updateBook(data) {
  return request({
    url: '/visit/book',
    method: 'put',
    data: data
  })
}

// 删除访客预约信息
export function delBook(id) {
  return request({
    url: '/visit/book/' + id,
    method: 'delete'
  })
}

// 导出访客预约信息
export function exportBook(query) {
  return request({
    url: '/visit/book/' + 'export',
    method: 'post',
    params: query
  })
}
