微信小程序 把获取用户信息放在onLoad里面 会生效嘛?

小程序 文章 2021-03-04 12:21 372 0 全屏看文

AI助手支持GPT4.0

微信小程序 把获取用户信息放在onLoad里面 会生效嘛?Will it take effect for WeChat applet to get user information in onLoad?

微信小程序 把获取用户信息放在onLoad里面 会生效嘛?

微信小程序 把获取用户信息放在onLoad里面 真正发布会生效嘛?

Does the wechat app put the user information in onload to make the launch effective?

回答:

默垂眸:

你是说授权的 还是 wx.login API?

wx.login 这个API是可以的 授权的必须用catchtap或者button调起

此人已失联有事勿留言:

必须用户主动触发才行,不是放到哪个生命周期里面的

年轻乄霸道:

放在onLoad或者onShow 都不生效的。

必须使用catchtap或者button用户主动点击调起事件!

-EOF-

AI助手支持GPT4.0