getUserProfile 在开发工具连续N次试验结果?与文档描述相差太大了

小程序 文章 2021-03-25 09:01 995 0 全屏看文

AI助手支持GPT4.0

getUserProfile 在开发工具连续N次试验结果?与文档描述相差太大了GetUserProfile N consecutive test results in the development tool? It is too different from the document description

getUserProfile 在开发工具连续N次试验结果?与文档描述相差太大了

win7专业版

开发工具版本1.05.2103190

基础库 2.15.0

wx.canIUse("getUserProfile")返回永远是false

当wx.authorize()返回"scope.userInfo":true时

wx.getUserProfile()偶尔与文档描述一至,弹出问询窗口

大部分时间返回 fail:can only be invoked by user TAP gesture.只能由用户点击手势调用。

过一会再点,又正常。注意can only be invoked by user TAP gesture后面那个.大部分时间有,偶尔没有

当wx.authorize()返回"scope.userInfo":false时

偶尔返回desc length does not meet the requirements

专门去数了一下desc ,27个

大部分还是can only be invoked by user TAP gesture

但是,当 使用我的用户信息 的开关切换过(无论切为开还是关),再调用wx.getUserProfile()大部分时间都能正确调用,弹出问询窗口。

无论你选择的是拒绝或允许。反正是不能接连点,否则can only be invoked by user TAP gesture

我TM哪里用错了????




Win7 professional development tool version 1.05.2103190 basic library 2.15.0 wx.canIUse ("getuserprofile") always returns false when wx.authorize () return“ scope.userInfo ": true wx.getUserProfile () once in a while, it will pop up a query window and return most of the time fail:can only Be invoked by user tap gesture. A little later, it's normal again. Pay attention to the one after can only be invoked by user tap heritage, Occasionally, I didn't do it wx.authorize () return“ scope.userInfo ": when false, occasionally return desc length does not meet the requirements. After counting the DESC, most of the 27 are still can only be invoked by user tap heritage After the switch is switched (whether it is on or off), call the wx.getUserProfile () it can be called correctly most of the time, and the inquiry window will pop up. Whether you choose to refuse or allow. Anyway, we can't connect points, otherwise we can only be invoked by user tap heritage. Where did I use TM wrongly????

回答:

Why not?:

有点魔幻。文档里可一点没提需要点击才能调用。

维她命系:

开发者工具清理所有缓存试试

大尾巴狼:试过了,清理编译缓存,全部清除都试过。没用,感觉有点用的,还是将desc的长度控制15个字符以下。能正确调用api的几率要大些。
大尾巴狼:明天发截图。什么狗屎API都不知道
维她命系:desc在开发者工具和真机上都没有看到显示的地方,填写了有什么用途?
大尾巴狼:

别让我上代码,烦不得

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
调试版可以调试,体验版为什么不能正常访问?
云函数上传失败?
微信支付回调只返回支付的金额,没有给xml数据是怎么回事
开发版和体验版<button open-type="getUserInfo">用户授权框没有弹出
微信开放平台的第三方平台,授权事件接收URL未被调用?
随便看看
微信开放平台跟公众平台有什么区别? 3607
怎么添加小程序支付功能? 4516
教育科技公司申请微信支付被拒绝? 4798
微信公众号免300认证教程 5892
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 5299
小程序广告组件通过审核,但是小程序内没有显示广告? 5067
企业微信通讯录账号被管理员误/恶意删除,怎么办? 9568
问题? 9047
如何快速搭建抽奖助手小程序(无需代码知识) 6177
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 7471