| | |
| | | if (!this.data.thisData.createrMobile) { |
| | | return app.showModal("请填写手机号码!"); |
| | | } |
| | | if (/^[1]([3-9])[0-9]{9}$/.test(this.data.thisData.createrMobile)==false){ |
| | | return app.showModal("手机号码有误!"); |
| | | } |
| | | if (!this.data.thisData.createrAddress) { |
| | | return app.showModal("请填写联系方式!"); |
| | | return app.showModal("请填写联系地址!"); |
| | | } |
| | | } |
| | | wx.request({ |
| | |
| | | wx.showToast({ |
| | | title: '提交成功!', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }) |
| | | duration: 2000, |
| | | success: function() { |
| | | setTimeout(function() { |
| | | //要延时执行的代码 |
| | | wx.navigateBack({ |
| | | delta: 2 |
| | | }) |
| | | }, 1000) //延迟时间 |
| | | }, |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | checkMobile: function() { |
| | | var sMobile = document.mobileform.mobile.value |
| | | if (!(/^1[3|4|5|8][0-9]\d{4,8}$/.test(sMobile))) { |
| | | alert("不是完整的11位手机号或者正确的手机号前七位"); |
| | | document.mobileform.mobile.focus(); |
| | | return false; |
| | | } |
| | | }, |
| | | |
| | | // 选择地理位置 |
| | | chooseLocation: function(e) { |
| | | const that = this; |