|
...
|
...
|
@@ -28,6 +28,13 @@ Page({ |
|
|
|
r.sid=this.data.sid
|
|
|
|
packs[r.id]=r
|
|
|
|
})
|
|
|
|
do{
|
|
|
|
packs[Math.random()]={}
|
|
|
|
}while(Object.keys(packs).length<3)
|
|
|
|
if(!packs[this.activityId]){
|
|
|
|
util.toast('套餐已下架','none')
|
|
|
|
this.activityId=res.data[0].id
|
|
|
|
}
|
|
|
|
this.setData({
|
|
|
|
packs:packs,
|
|
|
|
activityId:this.activityId,
|
|
...
|
...
|
@@ -95,10 +102,12 @@ Page({ |
|
|
|
}else{
|
|
|
|
current=index>0?(index-1):0
|
|
|
|
}
|
|
|
|
return current
|
|
|
|
return current>0?current:0
|
|
|
|
},
|
|
|
|
touchTab(e){
|
|
|
|
this.activityId=util.attr(e,'id')
|
|
|
|
let activityId=util.attr(e,'id')
|
|
|
|
if(!activityId) return;
|
|
|
|
this.activityId=activityId
|
|
|
|
let obj={
|
|
|
|
activityId:this.activityId,
|
|
|
|
}
|
...
|
...
|
|