| if (!this.data.sendCode){ | if (!this.data.sendCode){ | ||||
| return; | return; | ||||
| } | } | ||||
| app.wxRequest(app.globalData.urlRoot + "captcha/sendCaptcha", { mobile:this.data.subscribeData.mobile},res=>{ | |||||
| console.log(res); | |||||
| this.data.sendCode = false; | |||||
| app.wxRequest(app.globalData.urlRoot + "captcha/sendCaptcha", { mobile: this.data.subscribeData.mobile }, res => { | |||||
| this.data.sendCode = true; | |||||
| if (res.code == 200) { | if (res.code == 200) { | ||||
| this.countDown(); | this.countDown(); | ||||
| wx.showToast({ | wx.showToast({ | ||||
| this.setData({ | this.setData({ | ||||
| verificationCode:60 | verificationCode:60 | ||||
| }) | }) | ||||
| this.data.sendCode = false; | |||||
| }else{ | }else{ | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: res.msg, | title: res.msg, | ||||
| }) | }) | ||||
| return; | return; | ||||
| } | } | ||||
| if (!this.data.sendCode) { | |||||
| return; | |||||
| } | |||||
| this.data.sendCode = false; | |||||
| app.wxRequest(app.globalData.urlRoot + "userInfo/submitOrderInfo", this.data.subscribeData, res => { | app.wxRequest(app.globalData.urlRoot + "userInfo/submitOrderInfo", this.data.subscribeData, res => { | ||||
| this.data.sendCode = true; | |||||
| if (res.code == 200) { | if (res.code == 200) { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: '预约成功' | title: '预约成功' |
| if (!this.data.sendCode) { | if (!this.data.sendCode) { | ||||
| return; | return; | ||||
| } | } | ||||
| app.wxRequest(app.globalData.urlRoot + "captcha/sendCaptcha", { mobile: this.data.subscribeData.mobile}, res => { | |||||
| this.data.sendCode = false; | |||||
| app.wxRequest(app.globalData.urlRoot + "captcha/sendCaptcha", { mobile: this.data.subscribeData.mobile }, res => { | |||||
| this.data.sendCode = true; | |||||
| if (res.code == 200) { | if (res.code == 200) { | ||||
| this.countDown(); | this.countDown(); | ||||
| wx.showToast({ | wx.showToast({ | ||||
| this.setData({ | this.setData({ | ||||
| verificationCode: 60 | verificationCode: 60 | ||||
| }) | }) | ||||
| this.data.sendCode = false; | |||||
| } else { | } else { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: res.msg, | title: res.msg, | ||||
| }) | }) | ||||
| return; | return; | ||||
| } | } | ||||
| if (!this.data.sendCode) { | |||||
| return; | |||||
| } | |||||
| this.data.sendCode = false; | |||||
| app.wxRequest(app.globalData.urlRoot + "userInfo/submitOrderInfo", this.data.subscribeData, res => { | app.wxRequest(app.globalData.urlRoot + "userInfo/submitOrderInfo", this.data.subscribeData, res => { | ||||
| this.data.sendCode = true; | |||||
| if (res.code == 200) { | if (res.code == 200) { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: '预约成功' | title: '预约成功' |
| */ | */ | ||||
| onShareAppMessage: function () { | onShareAppMessage: function () { | ||||
| return app.sharePack(); | return app.sharePack(); | ||||
| }, | |||||
| backPage: function () { | |||||
| wx.navigateBack({ | |||||
| delta:1 | |||||
| }) | |||||
| } | } | ||||
| }) | }) |
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class="immediateFetching"> | <view class="immediateFetching"> | ||||
| <view class="prizeTitle" style="margin-top:0;">立即抓取</view> | |||||
| <view class="prizeTitle" bindtap="backPage" style="margin-top:0;">立即抓取</view> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <tabBar></tabBar> | <tabBar></tabBar> |