Showing
2 changed files
with
6 additions
and
2 deletions
| @@ -39,6 +39,10 @@ Component({ | @@ -39,6 +39,10 @@ Component({ | ||
| 39 | this.triggerEvent("share"); | 39 | this.triggerEvent("share"); |
| 40 | break; | 40 | break; |
| 41 | case 1: | 41 | case 1: |
| 42 | + if(!/^1\d{10}$/.test(this.data.bookInfo.phone)){ | ||
| 43 | + util.toast('手机号码错误','none') | ||
| 44 | + return; | ||
| 45 | + } | ||
| 42 | wx.navigateTo({ | 46 | wx.navigateTo({ |
| 43 | url:'/pages/book/b_sms?id='+this.data.bookInfo.id | 47 | url:'/pages/book/b_sms?id='+this.data.bookInfo.id |
| 44 | }); | 48 | }); |
| @@ -328,10 +328,10 @@ module.exports = { | @@ -328,10 +328,10 @@ module.exports = { | ||
| 328 | } | 328 | } |
| 329 | }); | 329 | }); |
| 330 | }, | 330 | }, |
| 331 | - toast:function(title){ | 331 | + toast:function(title,icon='success'){ |
| 332 | wx.showToast({ | 332 | wx.showToast({ |
| 333 | title:title, | 333 | title:title, |
| 334 | - icon:"success" | 334 | + icon:icon |
| 335 | }) | 335 | }) |
| 336 | }, | 336 | }, |
| 337 | showLoading:function(title){ | 337 | showLoading:function(title){ |
-
Please register or login to post a comment