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