通过button(open-type="getUserInfo")获取用户信息,没有谈授权框?

小程序 文章 6 天前 0 10 全屏看文

通过button(open-type="getUserInfo")获取用户信息,没有谈授权框?Get user information through button (open-type="getUserInfo"), but don’t talk about the authorization box?

通过button(open-type="getUserInfo")获取用户信息,没有谈授权框?

<button open-type="getUserInfobindtap="clickEventclass="safeLoginBtnbindgetuserinfo="getUserInfodisabled="{{disabled}}">安全登录</button>

基础库 2.15.0,获取用户信息,前段时间还是正常的,最近就获取不到了,也不报错,不弹出授权框,直接返回不正确的用户信息

  1. avatarUrl"https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132"
  2. city""
  3. country""
  4. gender0
  5. language""
  6. nickName"微信用户"
  7. province""


< button open type = "getUserInfo" bindtap = "clickevent" class = "safeloginbtn" bindgetuserinfo "{{disabled}" > it is normal to log in to < / button > basic library 2.15.0 to obtain user information, but it is not available recently, and no error is reported. The authorization box does not pop up, and the incorrect user information is returned directly " https://thirdwx.qlogo.cn/mmopen/vi_ 32 / pogewh4miho4nibh0klmecnjgxquq24zeagt4poc6icriccvgksyxwibcpq4bwmiaigug1icwxaqx6grc9vemzoj8rg / 132 "City:" country: "gender: 0 language:" nickname: "wechat user" province ":“

回答:

社区技术运营专员-Jahozheng:

周知: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


青团社:

建议 提问题前先搜索下。社区 问这个问题的这么多。。

-EOF-