wx.getUserProfile需要在哪个基础库才生效?

小程序 文章 2021-03-22 15:01 542 0 全屏看文

AI助手支持GPT4.0

wx.getUserProfile需要在哪个基础库才生效?Which base library does wx.getUserProfile need to take effect?

wx.getUserProfile需要在哪个基础库才生效?

目前真机调试设置了2.10.4~2.11.2,在开发工具上是行的,但是真机不行,麻烦微信那边解决一下,毕竟到4月份了wx.getUserInfo接口改了,如果wx.getUserProfile还是不行的话怎么办。。。。

真机版本:

代码输出:

输出结果:


At present, 2.10.4 ~ 2.11.2 are set for real machine debugging, which is OK in development tools, but the real machine is not OK. Please solve it on wechat. After all, it's April wx.getUserInfo The interface is changed if wx.getUserProfile If not, what should we do.... Real version: code output: output result:

回答:

武曲心:

wx.getUserProfile只能由bindtap触发的事件里调用,longpress,touch之类都不行,onshow,onload就更不行了,if(wx.getUserProfile)判断都是不能用的,其实wx.getUserProfile用法沿用了getUserInfo一些特征的。

ᯅ对方已拒绝:

2.15.0的可以

|G.XIAO|:

Brother斌🎈:

做好让用户手动填写昵称、上传头像的准备

新😹 😂 👿 👾 (๑'ᴗ'๑):
Brother斌🎈:if(wx.getUserProfile)判断能不能用,不能用就让用户自己填信息

-EOF-

AI助手支持GPT4.0