小程序怎么判断是否重新进入小程序,或者有重新进入小程序一定会执行的方法?

小程序 文章 2021-03-12 11:01 541 0 全屏看文

AI助手支持GPT4.0

小程序怎么判断是否重新进入小程序,或者有重新进入小程序一定会执行的方法?How does the applet judge whether to re-enter the applet, or there is a method that will be executed after re-entering the applet?

小程序怎么判断是否重新进入小程序,或者有重新进入小程序一定会执行的方法?

小程序怎么判断是否重新进入小程序,即我退出了小程序,然后再重新进去,这个退出的时间可能就十几秒钟,或者重新进入小程序一定会执行的方法

How does an applet judge whether to re-enter an applet? That is, I exit the applet and then re-enter it. The exit time may be more than ten seconds, or the method that the re-entry of an applet will be executed

回答:

|G.XIAO|:

app.js 的onLaunch和onShow

https://developers.weixin.qq.com/miniprogram/deveference/api/App.html#onshowobject-object

提问之前建议先搜索,一般常规问题社区都有人问过。

觉得有帮助,帮忙点个有用或赞,谢谢


默垂眸:

app.js 的onShow函数

Brother斌🎈:

onShow周期

-EOF-

AI助手支持GPT4.0