手机号绑定微信(shuntian)(Mobile number binding wechat (Shuntian))

gotoSetwechat:function(){ if(this.personalData.set_wechat == 0){ var auth = this.auths[this.authId]; var waiting = plus.nativeUI.showWaiting(); auth.authorize(function(event){ console.log(JSON.stringify(event.code)) Http.post({ api: Http.HOST + Http.API_URL.BINDWEIXIN, data: { code: event.code }, success: function(res) { waiting.close() app.personalData.set_wechat = 1 app.userInfo.set_wechat = true plus.storage.setItem(‘userInfo’,JSON.stringify(app.userInfo)) plus.nativeUI.toast(‘绑定成功’) }, error: function(e) { waiting.close() console.log(JSON.stringify(e)) plus.nativeUI.toast(e.message) } }) }) }else{ plus.nativeUI.toast(‘已经绑定微信号’) } },

————————

gotoSetwechat:function(){ if(this.personalData.set_wechat == 0){ var auth = this.auths[this.authId]; var waiting = plus.nativeUI.showWaiting(); auth.authorize(function(event){ console.log(JSON.stringify(event.code)) Http.post({ api: Http.HOST + Http.API_URL.BINDWEIXIN, data: { code: event.code }, success: function(res) { waiting.close() app.personalData.set_wechat = 1 app.userInfo.set_wechat = true plus.storage.setItem(‘userInfo’,JSON.stringify(app.userInfo)) plus.nativeUI.toast(‘绑定成功’) }, error: function(e) { waiting.close() console.log(JSON.stringify(e)) plus.nativeUI.toast(e.message) } }) }) }else{ plus.nativeUI.toast(‘已经绑定微信号’) } },