getUserProfile
作者:
追逐繁星的阿忠 | 来源:发表于
2021-05-18 14:42 被阅读0次
getUserProfile(e) {
let self = this;
// 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
// 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
wx.getUserProfile({
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (res) => {
console.log('AAAAAAAAAAA', res)
self.isCheck = true; //用户已经授权了
self.userInfo = res.userInfo; // 用户的基础数据
/*this.setData({
userInfo: res.userInfo,
hasUserInfo: true
})*/
}
})
},
本文标题:getUserProfile
本文链接:https://www.haomeiwen.com/subject/gyzejltx.html
网友评论