import request from '@/utils/request'

// 查询套餐订单列表
export function listPackageOrder(query) {
  return request({
    url: '/store/packageOrder/list',
    method: 'get',
    params: query
  })
}
export function myListPackageOrder(query) {
  return request({
    url: '/store/packageOrder/myList',
    method: 'get',
    params: query
  })
}
export function payment(orderId) {
  return request({
    url: '/store/packageOrder/payment/' + orderId,
    method: 'get'
  })
}
export function inquiryRefund(orderId) {
  return request({
    url: '/his/packageOrder/inquiryRefund/' + orderId,
    method: 'get'
  })
}
export function storeRefund(orderId) {
  return request({
    url: '/his/packageOrder/storeRefund/' + orderId,
    method: 'get'
  })
}
// 查询套餐订单详细
export function getPackageOrder(orderId) {
  return request({
    url: '/store/packageOrder/' + orderId,
    method: 'get'
  })
}
export function getWxaCodeUnLimit(orderId) {
  return request({
    url: '/store/packageOrder/getWxaCodeUnLimit/' + orderId,
    method: 'get'
  })
}
// 新增套餐订单
export function addPackageOrder(data) {
  return request({
    url: '/store/packageOrder',
    method: 'post',
    data: data
  })
}

// 修改套餐订单
export function updatePackageOrder(data) {
  return request({
    url: '/store/packageOrder',
    method: 'put',
    data: data
  })
}

// 删除套餐订单
export function delPackageOrder(orderId) {
  return request({
    url: '/store/packageOrder/' + orderId,
    method: 'delete'
  })
}

// 导出套餐订单
export function exportPackageOrder(query) {
  return request({
    url: '/store/packageOrder/export',
    method: 'get',
    params: query
  })
}
// 导出套餐订单
export function myExportPackageOrder(query) {
  return request({
    url: '/store/packageOrder/myExport',
    method: 'get',
    params: query
  })
}

// 查询电话
export function getUserPhone(orderId) {
  return request({
    url: '/store/packageOrder/queryPhone/' + orderId,
    method: 'get'
  })
}
