import request from '@/utils/request'

// 根据搜索条件获取物业端号码
export function getTelsList(data) {
  return request({
    url: '/tels',
    method: 'get',
    params: {
      name: data.name,
      tel: data.tel,
      remark: data.remark,
      pageNum: data.pageNum,
      pageSize: data.pageSize
    }
  })
}

// 添加 物业号码
export function telAdd(data) {
  return request({
    url: '/tel/add',
    method: 'post',
    data: {
      name: data.name,
      tel: data.tel,
      remark: data.remark
    }
  })
}

// 物业号码修改
export function telUpdate(data) {
  return request({
    url: '/tel/update',
    method: 'put',
    data: {
      id: data.id,
      name: data.name,
      tel: data.tel,
      remark: data.remark
    }
  })
}

// 根据id查询 物业号码详情
export function getTelById(id) {
  return request({
    url: '/tel/' + id,
    method: 'get'
  })
}

// 批量删除 物业号码
export function telDeleteProperty(data) {
  return request({
    url: '/tel/delete',
    method: 'post',
    data
  })
}

