getUserInfo 返回信息无效?

小程序 文章 2021-04-03 21:22 427 0 全屏看文

AI助手支持GPT4.0

getUserInfo 返回信息无效?getUserInfo returns invalid information?

getUserInfo 返回信息无效?

getUserInfo 成功后返回新为无效信息 正常该为微信昵称及正常微信头像 返回头像为微信默认头像

After getUserInfo is successful, the new message will be returned as invalid information. The normal message will be wechat nickname and normal wechat avatar. The returned avatar will be wechat default avatar

回答:

圣殿骑士:

线上要到4月13日才会完全改成新的,但是现在的开发环境包括IDE工具已经更新成新的方案。

如果你当心到时候无法顺利切换,可以使用 wx.canIUse

这个方法来判断 getUserProfile 来做切换

具体方法:https://developers.weixin.qq.com/community/develop/doc/000cacfa20ce88df04cb468bc52801

|G.XIAO|:

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


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

青寒:

建议新的开发尽快应用官方新的改动。

参见:https://developers.weixin.qq.com/community/develop/doc/000cacfa20ce88df04cb468bc52801

-EOF-

AI助手支持GPT4.0