WeChat Mini Programs-js triggers tap event

I want to achieve the function of popping up the authorization window about Wechat user information as soon as I enter Mini Program. In the past, the authorization window will pop up directly by calling wx.getUserInfo, but now Wechat has made changes. Only when using button will the authorization window appear
I want to set a button to be transparent. When the home page load triggers the tap event in js
now the problem is, how to write the trigger event in js? No introduction is found, or can"t you do it in js at all?

Mar.28,2021

users can only manually trigger


Mini Program cannot trigger button events with js.
but I don't understand why user authorization has to pop up. Now that the official upgrade does not need authorization, it can be obtained directly by open-data. Isn't it better to have a silent user experience?


is there a WeChat group discussion


if possible, why would Wechat change the interface?


can only be triggered manually by the user, just as you cannot manually adjust the analog keyboard

Menu