// const baseUrl = '/api-v2'
const baseUrl = '/api'
// const baseUrl = '/check-api'
const wechat = '/wechat/:org'
const guest = '/guest/:org'

const $api = {
  common: {
    shareWx: {
      method: 'get',
      url: `${baseUrl}${guest}/wechat/jssdk/signature`
    }
  },
  lottery: {
    userInfo: { // 获取用户信息
      method: 'get',
      url: `${baseUrl}${wechat}/luckdraw/user/:id`
    },
    getPrize: { // 获取抽奖信息
      method: 'get',
      url: `${baseUrl}${wechat}/luckdraw/:id`
    },
    setPrize: { // 抽奖
      method: 'post',
      url: `${baseUrl}${wechat}/luckdraw/:id`
    },
    getRecord: { // 中奖记录
      method: 'get',
      url: `${baseUrl}${wechat}/luckdraw/record`
    },
    userRecordList: { // 用户中奖记录列表
      method: 'get',
      url: `${baseUrl}${wechat}/user/luckdraw/record`
    },
    userRecordDetail: { // 用户中奖记录详情
      method: 'get',
      url: `${baseUrl}${wechat}/user/luckdraw/record/:id`
    },
    setUser: { // 分享发送userId
      method: 'post',
      url: `${baseUrl}${wechat}/luckdraw/:id/share`
    },
    rushList: { // 抢购列表
      method: 'get',
      url: `${baseUrl}${wechat}/flashbuy/customer`
    },
    rushDetail: { // 抢购核销
      method: 'get',
      url: `${baseUrl}${wechat}/flashbuy/customerFlash/:customerFlashBuyId`
    }
  }
}
export default $api
