import { getUrlParameter } from '@js/utils';
import { get, post } from '../../http';

/**
 * 获取开奖信息
 */
const options = {
  id: getUrlParameter('contentId'),
  tender: Number(getUrlParameter('appPreview')),
  prizeId: getUrlParameter('prizeId'),
  consumerIdOrder: getUrlParameter('consumerIdOrder'),
  cdKey: getUrlParameter('cdKey')
};
export const openPrize = () => get('/youtui/ttl/openPrize');
export const getIndex = () => get('/youtui/ttl/index', options);
export const getShare = () => post('/youtui/ttl/share', options);
export const getTicket = () => post('/youtui/ttl/getTicket',options);
export const getCdk = () => get('/youtui/ttl/getCdKey', options);
export const getPrizePersonList = () => get('/youtui/ttl/getPrizePersonList',options);
