wx.getUserProfile 无法组件调用?

小程序 文章 2021-12-08 12:20 632 0 全屏看文

AI助手支持GPT4.0

wx.getUserProfile 无法组件调用?Wx.getUserProfile cannot be called by the component?

wx.getUserProfile 无法组件调用?

A页面通过bindtab 调用组件里的wx.getUserProfile 总是返回

getUserProfile:fail can only be invoked by user TAP gesture

是不是一定要在组件页面放个按钮才是正确的调用getUserProfile:fail 方法

A page calls wx.getuserprofile in the component through bindtab and always returns getuserprofile: fail can only be invoked by user tap gesture. Is it necessary to put a button on the component page to correctly call getuserprofile: fail method

回答:

社区技术运营专员-Jahozheng:

请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

Vagrant:算了,我现在 只能组件放个按钮,等你们优化吧
凌晨丶傍晚:

getUserProfile一定要手势调用,也就是按钮

Vagrant:组件页没放按钮,开发者工具可以,真机不行
凌晨丶傍晚:以真机为主
Vagrant:那又只有改代码了
Vagrant:

开发者工具可以通过A页面调用组件的getUserProfile方法,真机测试

返回 错误getUserProfile:fail can only be invoked by user TAP gesture


-EOF-

AI助手支持GPT4.0