这个问题是在我清理完开发者工具的授权缓存之后出现的,前端时间getuserinfo接口调整,因为我没有用到基础信息,所以根本不用改动,文档上也说明了getSetting接口会直接读取到scope.userInfo为true。
文档截图:
在控制台打印getSetting的返回值:
使用的工具是HBuilder X,uniapp编译到微信小程序。
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.
回答:
对出现了同样的问题,本来我们靠getuserinfo解码出unionid的也不存用户信息,我都没打算改,但是都不返回这个东西 我服气了
是版本库太低了吗?
现在接口更新了都不提供这个字段了,我现在也不知道要怎么判断这个