import request from '@/utils/request'

// 查询封号列表列表
export function listUserForbid(query) {
  return request({
    url: '/cai/userForbid/list',
    method: 'get',
    params: query
  })
}

export function unForbid(id) {
  return request({
    url: '/cai/userForbid/un/forbid',
    method: 'get',
    params:{id}
  })
}

export function userForbidInfo(userId) {
  return request({
    url: '/cai/userForbid/userForbidInfo',
    method: 'get',
    params:{userId}
  })
}


// 封IP
export function forbidIp(data) {
  return request({
    url: '/cai/userForbid/forbid/ip',
    method: 'post',
    data: data
  })
}

// 查询封号列表详细
export function getUserForbid(id) {
  return request({
    url: '/cai/userForbid/' + id,
    method: 'get'
  })
}

// 新增封号列表
export function addUserForbid(data) {
  return request({
    url: '/cai/userForbid',
    method: 'post',
    data: data
  })
}

// 删除封号列表
export function delUserForbid(id) {
  return request({
    url: '/cai/userForbid/' + id,
    method: 'delete'
  })
}
