import axios from '@/libs/axios.js'

// 获取订单列表
export const getOrderList = params => {
  return axios.request({
    url: `reserve/queryUnFinishList`,
    method: 'post',
	data: params
  })
}

// 取消订单 
export const cancelOrder = params => {
  return axios.request({
    url: `reserve/cancel`,
    method: 'post',
	data: params
  })
}

// 扫码下单
export const saomaOrder = params => {
  return axios.request({
    url: `customer/reserve/findCustInfo`,
    method: 'get',
	data: {}
  })
}

// 查看订单详情
export const orderDetail = (params) => {
  return axios.request({
    url: `/reserve/findById/${params.id}`,
    method: 'get',
	data: {}
  })
}

// 查询是否有待处理的订单
export const hasOrder = (params) => {
  return axios.request({
    url: `reserve/findUnfinishedNum`,
    method: 'get',
	data: {}
  })
}
// 查询商铺详情
// export const shopDetails = (params) => {
//   const url = `/customer/reserve/findById/${params.id}`
//   return axios.request({
//     url: url,
//     data: {},
//     method: 'get'
//   })
// }
