调用getUserProfile接口开发者工具上会返回vi这些数据,手机上就只返回userinfo?
发布于 5 年前 作者 haoxiuying 2205 次浏览 来自 官方Issues

调用getUserProfile接口开发者工具上会返回vi和encryptedData数据,为什么手机调试模式 和 体验版上面都只返回了userinfo

2 回复

更新下微信版本,看下基础库是否低于2.16.0

周知:getUserInfo 开发版 & 体验版 已对齐 getUserInfo 匿名表现,正式版将于 4月13日 正式对齐 getUserInfo 匿名表现。请开发者使用 getUserProfile 获取用户信息。开发版 & 体验版 scope.userInfo 调整将于 4月13日 对齐。

pc微信暂不支持wx.getUserProfile,可以参考示例代码进行兼容

https://developers.weixin.qq.com/miniprogram/dev/api/open-api/user-info/wx.getUserProfile.html#%E7%A4%BA%E4%BE%8B%E4%BB%A3%E7%A0%81

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

回到顶部