如何监听重新进入小程序事件?

小程序 文章 2022-01-11 12:40 1980 0 全屏看文

AI助手支持GPT4.0

如何监听重新进入小程序事件?How to listen to the re-entry applet event?

如何监听重新进入小程序事件?

当用户点击重新进入小程序时,想让它重新登陆,所以需要监听这个事件,去除缓存。如何实现?

还有没有另外一种方法,可以在上面的界面中增加一个退出登录的按钮,然后监听这个按钮?

When the user clicks to re-enter the applet, he wants it to log in again, so he needs to listen to this event and remove the cache. How? Is there another way to add an exit login button in the above interface, and then listen to this button?

回答:

Larry:

重新进入小程序,在onLaunch里面执行你的操作应该就可以了

brave:

目前暂不支持。

-EOF-

AI助手支持GPT4.0