button获取用户信息不弹窗?直接返回成功回调,但是没有正确的用户信息

小程序 文章 2022-02-24 17:20 314 0 全屏看文

AI助手支持GPT4.0

button获取用户信息不弹窗?直接返回成功回调,但是没有正确的用户信息The button does not pop up the user information to get the user information? The success callback is returned directly, but there is no correct user information

button获取用户信息不弹窗?直接返回成功回调,但是没有正确的用户信息

之前小程序用的是open-data去获取用户头像的,但是功能回收以后,现在改成用button去让客户手动授权获取了。在微信开发者工具中,可以掉起授权框,获取到正确的用户信息。但是在手机上却没有给我掉起授权框,直接进去success回调,返回的avatarUrl是一个默认头像,nickName是微信用户。换了其他几个微信号试了依旧如此。

Before, the applet used open data to obtain the user's Avatar, but after the function is recycled, now it uses button to let the customer manually authorize it. In the wechat developer tool, you can drop the authorization box to obtain the correct user information. But I didn't drop the authorization box on my mobile phone. I went directly to success callback. The returned avatarurl is a default avatar, and nickname is a wechat user. I changed several other micro signals and tried it. It's still the same.

回答:

小黎:
用getUserProfile

Mr.Zhao:

现在用的是wx.getUserProfile

-EOF-

AI助手支持GPT4.0