使用新getUserProfile,在ios环境体验版无法获取对应签名信息?
发布于 6 年前 作者 rcheng 12204 次浏览 来自 问答
                            wx.getUserProfile({
                  lang:'en',
                  desc:'完善会员资料',
                  success:(res) => {
                    
                    console.log(res)
  
                  },fail(err){
                    console.log(err)
                  }
                })

请帮忙看下测试下是什么问题,开发工具是可以的。

2 回复

上面问题,是因为手机之前的小程序版本太低,需要使用开发者工具推送新的微信小程序版本

周知:小程序将暂缓调整公告 “小程序登录、用户信息相关接口调整说明” 中关于 4月13日 后发布的小程序将回收 wx.getUserInfo 接口可获取用户个人信息能力。回收时间近期内会确定并通知,建议开发者提前适配 wx.getUserInfo 接口回收场景。


补充说明:

1、建议开发者尽快使用 wx.getUserProfile 来获取用户信息,2.10.4 以下基础库不支持使用 wx.getUserProfile 获取用户信息,采用 wx.getUserInfo 原有获取流程不受影响,兼容方式参考示例代码:https://developers.weixin.qq.com/miniprogram/dev/api/open-api/user-info/wx.getUserProfile.html

2、正式版小程序在 wx.getUserInfo 回收前可正常使用,回收后将返回匿名信息

3、wx.getSetting 获取的 scope.userInfo 按照调用 wx.getUserInfo 返回,返回匿名数据 scope.userInfo 也为 true

4、wx.getUserProfile返回的iv、encryptedData 解密获取不到 unionId,请使用 wx.login 获取 unionId

5、wx.getUserProfile 基础库2.16.0以下,无法获取 iv 和 encryptedData,近期会灰度覆盖到 2.10.4


小程序登录、用户信息相关接口调整说明:https://developers.weixin.qq.com/community/develop/doc/000cacfa20ce88df04cb468bc52801

回到顶部