|
...
|
...
|
@@ -31,6 +31,7 @@ Page({ |
|
|
|
this.setData({
|
|
|
|
packs:packs,
|
|
|
|
activityId:this.activityId,
|
|
|
|
current:this.getCurrent(this.activityId,packs)
|
|
|
|
})
|
|
|
|
this.getActivityDetail()
|
|
|
|
})
|
|
...
|
...
|
@@ -84,13 +85,8 @@ Page({ |
|
|
|
onShareAppMessage: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
touchTab(e){
|
|
|
|
this.activityId=util.attr(e,'id')
|
|
|
|
let obj={
|
|
|
|
activityId:this.activityId,
|
|
|
|
}
|
|
|
|
let id=util.attr(e,'id')
|
|
|
|
let ps=Object.keys(this.data.packs)
|
|
|
|
getCurrent(id,packs){
|
|
|
|
let ps=Object.keys(packs)
|
|
|
|
let index=ps.indexOf(id)
|
|
|
|
let length=ps.length;
|
|
|
|
let current=0
|
|
...
|
...
|
@@ -99,7 +95,15 @@ Page({ |
|
|
|
}else{
|
|
|
|
current=index>0?(index-1):0
|
|
|
|
}
|
|
|
|
obj.current=current
|
|
|
|
return current
|
|
|
|
},
|
|
|
|
touchTab(e){
|
|
|
|
this.activityId=util.attr(e,'id')
|
|
|
|
let obj={
|
|
|
|
activityId:this.activityId,
|
|
|
|
}
|
|
|
|
let id=util.attr(e,'id')
|
|
|
|
obj.current=this.getCurrent(id,this.data.packs)
|
|
|
|
this.setData(obj)
|
|
|
|
this.getActivityDetail();
|
|
|
|
},
|
...
|
...
|
|