Commit 4b3e0854 authored by ziyu's avatar ziyu

improvement: 接口联调

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