PC端小程序报错:wx.getUserProfile is not a function,不支持吗?

小程序 文章 2021-03-23 14:01 1013 0 全屏看文

AI助手支持GPT4.0

PC端小程序报错:wx.getUserProfile is not a function,不支持吗?The PC applet reports an error: wx.getUserProfile is not a function, is it not supported?

PC端小程序报错:wx.getUserProfile is not a function,不支持吗?

如上图,在pc端小程序调用wx.getUserProfile出现报错

As shown in the figure above, in the PC side small program call wx.getUserProfile An error has been reported

回答:

Brother斌🎈:

pc端小程序有的基础库也不支持,需要自行判断吧

大黑皮:

基础库版本的问题吧 把基础库版本调到2.15.0试试?

赵子成:开发工具用的就是2.15.0,pc端小程序不支持  真机调试后自动切成2.11.0了
大黑皮:开发者版本最新的好像有点问题 我之前用最新的也发现问题了 然后回退了一个版本  1.05.2102010 我现在用的是这个版本的 是可以用的
大黑皮:
赵子成:不是开发工具的问题是 PC端小程序  你真机预览看下
大黑皮:pc版小程序版本库没办法改。。我是直接try catch的 catch里写个提示 当前微信版本无法获取用户信息 (这样的话 一些不是最新版微信的 基础库版本不在这个里面的 就不让他们获取信息了)
赵子成:嗯 目前来看 PC端确实暂时是用不了这个api
赵子成:

代码片段(PC端真机调试可复现):https://developers.weixin.qq.com/s/X7X4t0mn73pY

-EOF-

AI助手支持GPT4.0