import request from '@/utils/request'

// 首页数据
export function getIndex() {
	return request.get({ url: '/mall/index' }, { isAuth: true })
}

//兑换
export function buy(data : any) {
	return request.post({ url: '/mall/buy', data }, { isAuth: true })
}

//兑换记录
export function recordLists(data : any) {
	return request.get({ url: '/mall/recordLists', data }, { isAuth: true })
}

// 抽奖数据
export function getDrawIndex() {
	return request.get({ url: '/mall/drawIndex' }, { isAuth: true })
}

//抽奖
export function draw(data : any) {
	return request.post({ url: '/mall/draw', data }, { isAuth: true })
}

//抽奖记录
export function drawLists(data : any) {
	return request.get({ url: '/mall/drawLists', data }, { isAuth: true })
}