Commit e33f09902f32289b8f00eaedff5d6512ed82bfec

Authored by vking
1 parent 1352d7dc

taocan

<!--components/2.0/taocan/card.wxml-->
<navigator url="/pages/taocan/index?sid={{detail.sid}}&pid={{detail.id}}" hover-class="navigator-hover">
<view class="view flex margin-bottom-lg card">
<view class="view thumb" style="background-image: url('{{detail.main_url}}?imageView2/2/w/320')"></view>
<view class="view margin-left">
... ... @@ -21,7 +22,6 @@
<view class="view margin-left-xs txt-24-h">{{(detail.discount*10)}}折</view>
</view>
</view>
<navigator url="/pages/taocan/index?sid={{detail.sid}}&pid={{detail.id}}" hover-class="navigator-hover">
<view class="button bg-blue-blue txt-28-h text-bold flex align-center justify-center">抢购</view>
</navigator>
<view class="button bg-blue-blue txt-28-h text-bold flex align-center justify-center">抢购</view>
</view>
</navigator>
... ...
... ... @@ -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,
}
... ...
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"usingComponents": {
"nav":"/components/nav/nav"
}
... ...
... ... @@ -87,7 +87,7 @@ Page({
ufid: this.options.id,
}).then(async res=>{
let qrcode=''
if(true || res.data.order_info.status==2){
if(res.data.order_info.status==2){
qrcode=util.http_build_query({
path:'pages/writeoff/setmeal',
//path:'pages/me/s_index',
... ...