import request from '@/utils/request'

// 获取所有电话
export function getPhoneList(data) {
  return request({
    url: '/user/getPhoneList',
    method: 'get',
    params: {
      name: data.name,
      tel: data.tel,
      remark: data.remark,
      pageNum: data.pageNum,
      pageSize: data.pageSize
    }
  })
}

// 添加所有电话
export function operateAdd(data) {
  return request({
    url: '/user/operateadd',
    method: 'post',
    params: {
      name: data.name,
      tel: data.tel,
      remark: data.remark
    }
  })
}

// 查询当前电话
export function getOperateId(data) {
  return request({
    url: '/user/getoperateId',
    method: 'post',
    data: {
      id: data.id
    }
  })
}

// 编辑当前电话
export function phoneedit(data) {
  return request({
    url: '/user/phoneedit',
    method: 'post',
    params: {
      id: data.id,
      name: data.name,
      tel: data.tel,
      remark: data.remark
    }
  })
}

// 编辑当前电话
export function operatedel(data) {
  return request({
    url: '/user/operatedel',
    method: 'post',
    data: {
      id: data.allId
    }
  })
}
