官方文档https://developers.weixin.qq.com/miniprogram/dev/api/open-api/user-info/wx.getUserProfile.html
我在用wx.getUserProfile的时候发现desc不填的话,会没办法唤起授权弹窗,如果遇到类似问题可以加上desc描述试下
wx.getUserProfile({
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (res) => {
this.setData({
userInfo: res.userInfo
})
}
})
我在用的时候发现desc不填的话,会没办法唤起授权弹窗,如果遇到类似问题可以加上desc描述