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

小程序 文章 2021-03-25 09:01 895 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群

相关文章
小程序自定义导航栏,可以实现导航文字不固定在顶部,随着页面下滑消失吗?
wx:if条件渲染突然不可用了,之前明明可以成功渲染的,为什么突然不可以了?
影视小程序进去一直转圈圈?
调用公众号模板消息接口,返回invalid credential?
微信小店可以卖虚拟商品吗?
随便看看
教育科技公司申请微信支付被拒绝? 4131
微信公众号免300认证教程 5160
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 4470
小程序广告组件通过审核,但是小程序内没有显示广告? 4441
企业微信通讯录账号被管理员误/恶意删除,怎么办? 8493
问题? 8118
如何快速搭建抽奖助手小程序(无需代码知识) 5274
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 6547
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5835
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5498