Showing
1 changed file
with
7 additions
and
2 deletions
| @@ -21,6 +21,8 @@ Component({ | @@ -21,6 +21,8 @@ Component({ | ||
| 21 | */ | 21 | */ |
| 22 | methods: { | 22 | methods: { |
| 23 | userinfo(e){ | 23 | userinfo(e){ |
| 24 | + if(this.hasToChat) return; | ||
| 25 | + this.hasToChat=true | ||
| 24 | let wechat=e.detail | 26 | let wechat=e.detail |
| 25 | wechat.openid=wechat.openid||getApp().openid | 27 | wechat.openid=wechat.openid||getApp().openid |
| 26 | console.log('userinfo',wechat) | 28 | console.log('userinfo',wechat) |
| @@ -29,10 +31,13 @@ Component({ | @@ -29,10 +31,13 @@ Component({ | ||
| 29 | openid: wechat.openid, // 小程序的openid,必填项 | 31 | openid: wechat.openid, // 小程序的openid,必填项 |
| 30 | success: () => { | 32 | success: () => { |
| 31 | wx.navigateTo({ | 33 | wx.navigateTo({ |
| 32 | - url: util.http_build_query(this.data.params,'/pages/me/chat') | 34 | + url: util.http_build_query(this.data.params,'/pages/me/chat'), |
| 35 | + success:()=>{ | ||
| 36 | + this.hasToChat=false | ||
| 37 | + }, | ||
| 33 | }); | 38 | }); |
| 34 | }, | 39 | }, |
| 35 | - fail: (error) => {}, | 40 | + fail: (error) => {this.hasToChat=false}, |
| 36 | guideList: [], | 41 | guideList: [], |
| 37 | textToSpeech: false, //默认为ture打开状态 | 42 | textToSpeech: false, //默认为ture打开状态 |
| 38 | background: "rgba(247,251,252,1)", | 43 | background: "rgba(247,251,252,1)", |
-
Please register or login to post a comment