转盘抽奖增加类型

This commit is contained in:
YeMingfei666 2024-12-20 18:17:15 +08:00
parent c9826276e9
commit 52506bb2af
1 changed files with 10 additions and 3 deletions

View File

@ -96,6 +96,10 @@
},
data() {
return {
// 1
// 2
// 3
source:1,
background:{
background:'transparent'
},
@ -237,7 +241,7 @@
// Promise
//
async requestApiGetPrizeList() {
const res = await this.$Request.getT('/app/discSpinning/selectDiscSpinning')
const res = await this.$Request.getT('/app/discSpinning/selectDiscSpinning',{source:this.source})
if (res.code == 0) {
return {
ok: true,
@ -434,7 +438,7 @@
async remoteGetPrizeIndex() {
this.result=''
console.warn('###当前处于模拟的请求接口,并返回了中奖信息###')
const res = await this.$Request.getT('app/discSpinning/draw')
const res = await this.$Request.getT('app/discSpinning/draw',{source:this.source})
this.freeNum--
// this.getCount()
console.log(res);
@ -539,7 +543,7 @@
}
},
async getCount(){
const res=await this.$Request.getT('app/discSpinning/drawCount')
const res=await this.$Request.getT('app/discSpinning/drawCount',{source:this.source})
if(res.code==0){
this.freeNum=res.count||0
this.freeNumDay=res.sum||0
@ -555,6 +559,9 @@
},
onLoad(opt) {
this.option = opt
if(opt.source){
this.source=opt.source
}
this.prizeList = []
this.getCount()
this.getRedPack()