import request from '@/utils/request'
// import qs from 'qs'

// 访客登记
export function addVisitorPerson(data) {
  return request({
    url: 'visitorPerson/add',
    method: 'post',
    data
  })
}

// 访客车辆及人员登记
export function addVisitorCarAndPerson(data) {
  return request({
    url: '/visitorCar/add',
    method: 'post',
    data
  })
}

// 查询来访人员记录
export function getVisitorList(params) {
  return request({
    url: '/visitorPerson/listPage',
    method: 'get',
    params
  })
}

// 查询来访车辆
export function getVisitorCarList(params) {
  return request({
    url: '/visitorCar/listPage',
    method: 'post',
    params
  })
}

// 查询来访人员详情
export function getVisitorDetail(visitorPersonId) {
  return request({
    url: '/visitorPerson/detail/' + visitorPersonId,
    method: 'get',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    }
  })
}

