微信登录.js文件// 微信授权获取手机号弹窗 getPhoneNumber: function (e) { var that = this; if (e.detail.errMsg == "getPhoneNumber:ok") { this.getLocation() wx.re_微信小程序刚进入的时候弹出绑定用户的手">
赞
踩
.wxml文件
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">微信登录</button>
.js文件
// 微信授权获取手机号弹窗 getPhoneNumber: function (e) { var that = this; if (e.detail.errMsg == "getPhoneNumber:ok") { this.getLocation() wx.request({ url: 'http://localhost/index/users/decodePhone', data: { encryptedData: e.detail.encryptedData, iv: e.detail.iv, sessionKey: that.data.session_key, uid: "", }, method: "post", success: function (res) { console.log('res...', res); } }) } }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。