import request from '@/utils/request'

// 列表
export function list(data){
  return request({
    url: `/appExchangeConfig/page`,
    method: 'post',
    data
  })
}

// 新增
export function create(data){
  return request({
    url: `/appExchangeConfig/save`,
    method: 'post',
    data
  })
}

// 详情
export function detail(id){
  return request({
    url: `/appExchangeConfig/get/${id}`,
    method: 'get'
  })
}

// 编辑
export function edit(data) {
  return request({
    url: `/appExchangeConfig/update`,
    method: 'post',
    data
  })
}

// 上下架
export function change(data){
  return request({
    url: `/appExchangeConfig/updateStatus`,
    method: 'post',
    data
  })
}

// 删除
export function remove(data){
  return request({
    url: `/appExchangeConfig/remove`,
    method: 'post',
    data
  })
}

// 套餐
export function mealList(type, businessType) {
  return request({
    url: `/admin/goods/queryList/${type}/${businessType}`,
    method: 'get'
  })
}