转盘抽奖增加类型

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