app.userInfoReadyCallback = res => {
console.log(res.userInfo, 'res.userInfo');
this.setData({
userInfo: res.userInfo,
hasUserInfo: true
});
};
这个api 突然在开发环境版本获取不到正确的用户信息了 哪位大神知道怎么回事
微信小程序获取userinfo头像信息突然获取不到了怎么回事?The WeChat applet can't get the userinfo profile picture suddenly, what's the matter?
微信小程序获取userinfo头像信息突然获取不到了怎么回事?app.userInfoReadyCallback = res => {
console.log(res.userInfo, 'res.userInfo');
this.setData({
userInfo: res.userInfo,
hasUserInfo: true
});
};
这个api 突然在开发环境版本获取不到正确的用户信息了 哪位大神知道怎么回事
app.userInfoReadyCallback = res => { console.log ( res.userInfo , ' res.userInfo '); this.setData ({ userInfo: res.userInfo , hasuserinfo: true});}; this API suddenly can't get the correct user information in the development environment version. Who knows what's going on
回答:
周知:getUserInfo 开发版和体验版 已对齐 getUserInfo 匿名表现,正式版将于 4月13日 正式对齐 getUserInfo 匿名表现。
请开发者使用 getUserProfile 获取用户信息。 小程序登录、用户信息相关接口调整说明:https://developers.weixin.qq.com/community/develop/doc/000cacfa20ce88df04cb468bc52801
还可以了解下用户授权的前世今生 https://developers.weixin.qq.com/community/develop/article/doc/000c8ce9a10070794cfbb0c085b013
小程序登录、用户信息相关接口调整说明
https://developers.weixin.qq.com/community/develop/doc/000cacfa20ce88df04cb468bc52801
周知: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