Commit 4b3e0854 authored by ziyu's avatar ziyu

improvement: 接口联调

parent b22c9d5f
......@@ -88,7 +88,7 @@
</van-popup>
<view class="footerheight"></view>
<view class="footer">
<button class="getprize" bindtap="goprize">领取</button>
<button class="getprize" bindtap="goprize">{{btnfont}}</button>
</view>
<van-dialog id="van-dialog" confirmButtonColor="#FF5D15"/>
<van-notify id="van-notify" />
......@@ -110,12 +110,13 @@
address:'',
province:'',
city:'',
country:'',
county:'',
cityValue:'',
areaList:[],
showAddress:false,
joinRecordId:null,
chance:''
chance:'',
btnfont:'领取'
},
methods: {
goprize() {
......@@ -148,19 +149,24 @@
phone:this.phone,
province:this.province,
city:this.city,
country:this.country,
county:this.county,
address:this.address,
};
let message = '您所领取的奖品我们将在3到5个工作日内寄出,请您耐心等待,感谢您的参与!';
let cashmeg = '您所领取的奖品我们将会在几分钟内发出,请您耐心等待,感谢您的参与!';
let that = this;
this.btnfont = '提交中...'
if(this.btnfont!=='领取') return;
getPrize(params).then(()=>{
this.btnfont = '领取';
Dialog.alert({
title: '领取成功',
message: that.prize.cash?cashmeg:message,
}).then(() => {
wx.reLaunch({url:'/pages/index'})
});
}).catch(()=>{
this.btnfont = '领取';
});
},
onClose() {
......@@ -175,7 +181,7 @@
let detail = event.$wx.detail.values;
this.province = detail[0].name;
this.city = detail[1].name;
this.country = detail[2].name;
this.county = detail[2].name;
this.cityValue = detail[0].name+detail[1].name+detail[2].name
this.onClose()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment