从一个小程序用navigator跳转到另一个小程序走不走app.js里面的方法?Can I use the navigator to jump from one small program to another small program using the method in app.js?
从一个小程序用navigator跳转到另一个小程序走不走app.js里面的方法?After the small program is forwarded, the user clicks the small program after the forwarding, and will go app.js Is there an onlaunch method or an Onshow method? If the applet itself has been opened, what will happen if it is opened again?
回答:
主要应该还是看是属于热启动还是冷启动,冷启动才会执行onLaunch
onLaunch是小程序启动
onSHow打开就有
当然走app.js方法,本身打开过 在走小程序生命周期内走onShow,打开时间过长或者内存不足小程序自动终止运行走onLaunch +onShow
onLaunch 生命周期回调——监听小程序初始化。
onShow 生命周期回调——监听小程序启动或切前台。