在网上找到了一个openid的获取方法,但是最后的传参不会写,有大佬可以帮帮吗?

小程序 文章 2022-04-20 17:00 353 0 全屏看文

AI助手支持GPT4.0

在网上找到了一个openid的获取方法,但是最后的传参不会写,有大佬可以帮帮吗?I found a way to get openid on the Internet, but the final parameter cannot be written, can anyone help?

在网上找到了一个openid的获取方法,但是最后的传参不会写,有大佬可以帮帮吗?

我用的code换取的openid的方法,在末尾openid也成功显示出来了,但是在外面调用的时候无法调用成功,是参数路径错误了吗?求大佬带带QAQ

The openid method I exchanged for the code is also successfully displayed at the end, but it cannot be called successfully when calling from outside. Is it the wrong parameter path? Ask the boss to bring QAQ

回答:

云D旋律:

你可以参考一下这篇博客:https://www.jianshu.com/p/c30c2af7056c

另外就是你的问题和截图感觉对不上号。如果是上面那个userInfo 报错,你可以把它注释掉,用下面异步回来的值进行取值操作。

若冰:好的  谢谢帮助  我看看去
七分:

JavaScript作用域了解下

Mr.Zhao:

异步问题,高频问题啊,写到success里

-EOF-

AI助手支持GPT4.0