/* eslint-disable no-confusing-arrow */

import { post, get } from '@/api/request'
import CONFIG from '@/config'
const { activityDomain } = CONFIG
const flag = process.env.X_CA_STAGE

// 获取个人抽奖记录
export const getRecordList = data =>
  flag
    ? get('/activity/DrawResult/getPersonAllRecordList', { data })
    : get('/activity/DrawResult/getPersonAllRecordList', { data, baseURL: activityDomain })

// 获取个人抽奖记录详情
export const getRecordDetail = data =>
  flag
    ? get('/activity/DrawResult/getRecordInfo', { data })
    : get('/activity/DrawResult/getRecordInfo', { data, baseURL: activityDomain })

// 获取个人抽奖记录详情
export const setLotteryAddress = data =>
  flag
    ? post('/activity/DrawResult/updateAddress', data)
    : post('/activity/DrawResult/updateAddress', data, { baseURL: activityDomain })
