import request from '@/api/request'

/**
 * 获取酒吧列表
 */
export const apiBarList = () => request({
  method: 'GET',
  url: '/api/v1/bar/list'
})

/**
 * 订座列表接口
 * @param id 酒吧ID
 */
export const apiPlaceList = (id) => request({
  method: 'GET',
  url: '/api/v1/bar/place/list',
  params: {
    id
  }
})

/**
 * 创建订座
 * @param postData 表单提交
 */
export const apiPlacePreOrder = (postData) => request({
  method: 'POST',
  url: '/api/v1/user/preorder/create',
  data: postData
})

/**
 * 获取公众号支付配置
 */
export const apiWxPayConfig = () => request({
  method: 'GET',
  url: '/api/wechat/account/config',
  params: {
    url: location.href,
    officialAccountCode: 'tingbang' //  写死
  }
})
