import request from '@/utils/request'

// 查询套餐包列表
export function listPackage(query) {
  return request({
    url: '/store/package/list',
    method: 'get',
    params: query
  })
}

export function packageList(packageName) {
  return request({
    url: '/store/package/packageList/' + packageName,
    method: 'get'
  })
}
export function allPackage() {
  return request({
    url: '/store/package/allList',
    method: 'get'
  })
}
// 查询套餐包详细
export function getPackage(packageId) {
  return request({
    url: '/store/package/' + packageId,
    method: 'get'
  })
}

// 新增套餐包
export function addPackage(data) {
  return request({
    url: '/store/package',
    method: 'post',
    data: data
  })
}

// 修改套餐包
export function updatePackage(data) {
  return request({
    url: '/store/package',
    method: 'put',
    data: data
  })
}

// 删除套餐包
export function delPackage(packageId) {
  return request({
    url: '/store/package/' + packageId,
    method: 'delete'
  })
}

// 导出套餐包
export function exportPackage(query) {
  return request({
    url: '/store/package/export',
    method: 'get',
    params: query
  })
}
