import request from '@/utils/request'

// 查询榜单列表
export function listRank(query) {
  return request({
    url: '/cai/rank/list',
    method: 'get',
    params: query
  })
}

// 查询榜单详细
export function getRank(id) {
  return request({
    url: '/cai/rank/' + id,
    method: 'get'
  })
}

// 新增榜单
export function addRank(data) {
  return request({
    url: '/cai/rank',
    method: 'post',
    data: data
  })
}

// 修改榜单
export function updateRank(data) {
  return request({
    url: '/cai/rank',
    method: 'put',
    data: data
  })
}

// 删除榜单
export function delRank(id) {
  return request({
    url: '/cai/rank/' + id,
    method: 'delete'
  })
}
