转盘抽奖增加类型
This commit is contained in:
parent
c9826276e9
commit
52506bb2af
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue