Commit b558cb0d960ffb65b8eed91bd56e58c9e7f68193

Authored by wangfan
1 parent 0040ec0a

smsbatch

@@ -39,10 +39,13 @@ Component({ @@ -39,10 +39,13 @@ 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 + if(!this.data.bookInfo.phone){
  43 + util.toast('未填写手机号码','none')
  44 + return;
  45 + }else if(!/^1\d{10}$/.test(this.data.bookInfo.phone)){
  46 + util.toast('手机号码错误','none')
  47 + return;
  48 + }
46 this.close(); 49 this.close();
47 wx.navigateTo({ 50 wx.navigateTo({
48 url:'/pages/book/b_sms?id='+this.data.bookInfo.id 51 url:'/pages/book/b_sms?id='+this.data.bookInfo.id
@@ -52,8 +55,10 @@ Component({ @@ -52,8 +55,10 @@ Component({
52 if(!this.data.bookInfo.hasOwner){ 55 if(!this.data.bookInfo.hasOwner){
53 return util.toast('只有记录人可以拨打','none'); 56 return util.toast('只有记录人可以拨打','none');
54 } 57 }
55 - if(this.data.bookInfo.phone.length<3){  
56 - return util.toast('号码错误','none'); 58 + console.log('this.data.bookInfo',this.data.bookInfo);
  59 + let pl=this.data.bookInfo.phone?this.data.bookInfo.phone.length:0;
  60 + if(pl<3){
  61 + return util.toast(pl==0?'未填写手机号码':'手机号码错误','none');
57 } 62 }
58 wx.makePhoneCall({ 63 wx.makePhoneCall({
59 phoneNumber: this.data.bookInfo.phone, //仅为示例,并非真实的电话号码 64 phoneNumber: this.data.bookInfo.phone, //仅为示例,并非真实的电话号码
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 right:0; 5 right:0;
6 top:0; 6 top:0;
7 bottom:0; 7 bottom:0;
8 - background:rgba(0,0,0,0); 8 + background:rgba(20,20,20,0.5);
9 } 9 }
10 .notice-fixed{ 10 .notice-fixed{
11 width:100%; 11 width:100%;