Showing
1 changed file
with
5 additions
and
0 deletions
| @@ -17,6 +17,7 @@ Component({ | @@ -17,6 +17,7 @@ Component({ | ||
| 17 | showGopay: false, | 17 | showGopay: false, |
| 18 | hasScene:1, | 18 | hasScene:1, |
| 19 | }, | 19 | }, |
| 20 | + hasCanSend:true,//是否可以点击发送按钮 | ||
| 20 | attached(){ | 21 | attached(){ |
| 21 | this.setData({ | 22 | this.setData({ |
| 22 | hasScene:util.cache('enter_params')?0:1, | 23 | hasScene:util.cache('enter_params')?0:1, |
| @@ -51,6 +52,8 @@ Component({ | @@ -51,6 +52,8 @@ Component({ | ||
| 51 | }) | 52 | }) |
| 52 | return; | 53 | return; |
| 53 | } | 54 | } |
| 55 | + if(!this.hasCanSend) return; | ||
| 56 | + this.hasCanSend=false; | ||
| 54 | let note_name = ''; | 57 | let note_name = ''; |
| 55 | let enter_params = util.cache('enter_params'); | 58 | let enter_params = util.cache('enter_params'); |
| 56 | 59 | ||
| @@ -70,6 +73,7 @@ Component({ | @@ -70,6 +73,7 @@ Component({ | ||
| 70 | } | 73 | } |
| 71 | App.Reserve.SmsBatchSend(param).then(res => { | 74 | App.Reserve.SmsBatchSend(param).then(res => { |
| 72 | if (res.ret != 200) { | 75 | if (res.ret != 200) { |
| 76 | + this.hasCanSend=true; | ||
| 73 | return util.toast(res.msg || '发送失败,请联系客服', 'none'); | 77 | return util.toast(res.msg || '发送失败,请联系客服', 'none'); |
| 74 | } | 78 | } |
| 75 | try{ | 79 | try{ |
| @@ -78,6 +82,7 @@ Component({ | @@ -78,6 +82,7 @@ Component({ | ||
| 78 | this.triggerEvent('send'); | 82 | this.triggerEvent('send'); |
| 79 | util.toast('已发送'); | 83 | util.toast('已发送'); |
| 80 | }).catch(res => { | 84 | }).catch(res => { |
| 85 | + this.hasCanSend=true; | ||
| 81 | util.toast('发送失败,请联系客服', 'none'); | 86 | util.toast('发送失败,请联系客服', 'none'); |
| 82 | }); | 87 | }); |
| 83 | }, | 88 | }, |
-
Please register or login to post a comment