Commit 72d9122ec2fe12bb111ea5d2ab3fe77cfa275dc2

Authored by wangfan
1 parent e564f49b

v2 book sendsms

@@ -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){