使用getUserProfile时候遇到了一个问题?

小程序 文章 2021-04-07 09:22 0 10 全屏看文

使用getUserProfile时候遇到了一个问题?Encountered a problem when using getUserProfile?

使用getUserProfile时候遇到了一个问题?

首先是给我的按钮绑定了一个点击事件

这里是js代码

然后预期的效果是,如果用户没有注册过就会去注册页面,如果注册过就直接调用getUserProfile获取用户信息,

可是实际上当是注册过的时候,却点了没有反应,但是连续点击,又可以弹出授权窗口,如下

这里点了一下没有反应,只输出了console.log

没有授权窗口

当快速点击到第七下的时候,出现了授权窗口

不知道是什么问题,else也试过了,也是这样。。

First of all, a click event is bound to my button. Here is the JS code. Then the expected effect is that if the user has not registered, he will go to the registration page. If he has registered, he will directly call getuserprofile to get the user information. But actually, when he has registered, he has no response. However, if he clicks continuously, he can pop up an authorization window, as follows There's no response here, only output console.log There is no authorization window. When you quickly click the seventh time, there is an authorization window. I don't know what the problem is. Else has tried it, too..

回答:

孙刘森:

重启电脑

this:

打印一下fail看看

|G.XIAO|:

搞个简单的代码片段看看

-EOF-