import request from '@/utils/request'

// 查询充值渠道列表
export function listChannel(query) {
  return request({
    url: '/business/channel/list',
    method: 'get',
    params: query
  })
}

// 查询充值渠道详细
export function getChannel(id) {
  return request({
    url: '/business/channel/' + id,
    method: 'get'
  })
}

// 新增充值渠道
export function addChannel(data) {
  return request({
    url: '/business/channel',
    method: 'post',
    data: data
  })
}

// 修改充值渠道
export function updateChannel(data) {
  return request({
    url: '/business/channel',
    method: 'put',
    data: data
  })
}

// 删除充值渠道
export function delChannel(id) {
  return request({
    url: '/business/channel/' + id,
    method: 'delete'
  })
}
