getUserProfile(e){
wx.getUserProfile({
desc:'使用户得到更好的体验',
success:(res)=>{
console.log("获取用户信息成功",res)
letuser=res.userInfo
wx.setStorageSync('user',user)
this.setData({
userInfo:res.userInfo,
showInfo:false
})
},
fail:res=>{
console.log("获取用户信息失败",res)
}
})
}
微信小程序无法获取用户头像和昵称 微信小程序获取昵称为微信用户 头像为灰色 请使用下面方式过去
如果觉得《微信小程序无法获取用户头像和昵称 微信小程序获取昵称为微信用户 头像为灰色 请使》对你有帮助,请点赞、收藏,并留下你的观点哦!