getSetting接口读取scope.userInfo为undefined

小程序 文章 2021-04-08 11:42 635 0 全屏看文

AI助手支持GPT4.0

getSetting接口读取scope.userInfo为undefinedThe getSetting interface reads scope.userInfo as undefined

getSetting接口读取scope.userInfo为undefined
框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug getSetting 工具 8.0.1 2.16.0

这个问题是在我清理完开发者工具的授权缓存之后出现的,前端时间getuserinfo接口调整,因为我没有用到基础信息,所以根本不用改动,文档上也说明了getSetting接口会直接读取到scope.userInfo为true。

文档截图:

在控制台打印getSetting的返回值:

使用的工具是HBuilder X,uniapp编译到微信小程序。

Framework type problem type API / component name terminal type wechat version basic library version applet bug getsetting tool 8.0.1 2.16.0 This problem occurred after I cleaned up the authorization cache of the developer tool. The front-end time getUserInfo interface was adjusted. Because I didn't use the basic information, I didn't need to change it at all. The document also states that the getsetting interface will read it directly scope.userInfo Is true. Document screenshot: print the return value of getsetting on the console: the tool used is hbuilder x, which compiles uniapp into wechat applet.

回答:

Aurora.:

现在接口更新了都不提供这个字段了,我现在也不知道要怎么判断这个

Samuel.Schrödinger:

对出现了同样的问题,本来我们靠getuserinfo解码出unionid的也不存用户信息,我都没打算改,但是都不返回这个东西 我服气了

陈:

是版本库太低了吗?

null:基础库是最新的,而且调整之后的“不触发授权弹窗”实现了,对于“getSetting”的调整却没实现

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
登录时的问题?
体验版小程序都无法发送请求到后端,获取不了数据?
微信小程序 把获取用户信息放在onLoad里面 会生效嘛?
查询更新记录
小程序web-view嵌入h5,h5页面可以直接跳到 另一个小程序吗?
随便看看
从技术角度优化网站加载过多从而导致网站速度打开过慢的问题 2579
阿里云com、cn域名续费优惠码(2020年2月可用) 2312
将爱某艺的qsv转成flv格式放到老人点播机里 2479
和平精英战术随机应变、城区刚枪、野点发育、找车转移 是什么意思 8491
老爷子收到了057128256416的电话号码 3113
阿里云com、cn域名续费优惠码(2020年3月可用) 2863
线上防疫题库正确答案 2932
线上防疫题库正确答案(多选题) 4825
微信设置不可以使用小程序(游戏小程序) 5634
adsense申请已经支付的订单回退的网址 3212