import request from '@/utils/request'

// 获取指定类型的手机号列表
export function getPhoneList(type) {
  return request({
    url: '/jarvis/phoneReplaceConfig/' + type,
    method: 'get'
  })
}

// 设置指定类型的手机号列表
export function setPhoneList(type, phoneList) {
  return request({
    url: '/jarvis/phoneReplaceConfig/' + type,
    method: 'put',
    data: phoneList
  })
}

// 添加手机号到指定类型
export function addPhone(type, phone) {
  return request({
    url: '/jarvis/phoneReplaceConfig/' + type + '/add',
    method: 'post',
    data: phone,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

// 从指定类型删除手机号
export function removePhone(type, phone) {
  return request({
    url: '/jarvis/phoneReplaceConfig/' + type + '/remove',
    method: 'post',
    data: phone,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

