import request from '@/utils/request'

// 查询用户协议列表
export function listProtocol(query) {
  return request({
    url: '/business/protocol/list',
    method: 'get',
    params: query
  })
}

// 查询用户协议详细
export function getProtocol(id) {
  return request({
    url: '/business/protocol/' + id,
    method: 'get'
  })
}

// 新增用户协议
export function addProtocol(data) {
  return request({
    url: '/business/protocol',
    method: 'post',
    data: data
  })
}

// 修改用户协议
export function updateProtocol(data) {
  return request({
    url: '/business/protocol',
    method: 'put',
    data: data
  })
}

// 删除用户协议
export function delProtocol(id) {
  return request({
    url: '/business/protocol/' + id,
    method: 'delete'
  })
}
