import request from '@/api/request'

/**
 * 获取预付款
 * @param id 酒吧ID
 */
export const apiAdvanceList = (id) => request({
  method: 'GET',
  url: '/api/v1/user/prepare/order/list',
  params: {
    bar_id: id
  }
})

/**
 * 获取优惠券
 * @param id 酒吧ID
 */
export const apiCouponList = (id) => request({
  method: 'GET',
  url: '/api/v1/user/coupon/list',
  params: {
    bar_id: id
  }
})

/**
 * 创建购买商品订单
 * @param postData
 */
export const apiAddOrder = (postData) => request({
  method: 'POST',
  url: '/api/v1/user/order/add',
  data: JSON.stringify(postData)
})
