import request from '@/utils/request'

// 查询充值卡版本列表
export function listCardVersion(query) {
  return request({
    url: '/mapi/recharge/cardVersion/list',
    method: 'get',
    params: query
  })
}

// 查询充值卡版本详细
export function getCardVersion(id) {
  return request({
    url: '/mapi/recharge/cardVersion/' + id,
    method: 'get'
  })
}

// 新增充值卡版本
export function addCardVersion(data) {
  return request({
    url: '/mapi/recharge/cardVersion',
    method: 'post',
    data: data
  })
}

// 修改充值卡版本
export function updateCardVersion(data) {
  return request({
    url: '/mapi/recharge/cardVersion',
    method: 'put',
    data: data
  })
}

// 删除充值卡版本
export function delCardVersion(id) {
  return request({
    url: '/mapi/recharge/cardVersion/' + id,
    method: 'delete'
  })
}


// 修改充值卡版本状态
export function updateCardVersionStatus(id,status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/mapi/recharge/cardVersion/updateStatus',
    method: 'post',
    data: data
  })
}
