其他分享
首页 > 其他分享> > 手机号绑定微信(shuntian)

手机号绑定微信(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('已经绑定微信号')
}
},

标签:function,set,手机号,shuntian,微信,app,code,plus,nativeUI
来源: https://www.cnblogs.com/yhxy/p/16268903.html