Micro-channel applet onLoad, onShow, onHide, onUnload difference

onLoad: The first page is loaded trigger, the trigger can not return from the jump page, you can pass parameters

onShow: when the page is displayed or display the page jump back when the applet from the background trigger fired when returning from the jump page, you can not pass parameters

onHide: hidden page, for example, wx.navigateTo just open a new page does not close the original page

onUnload: page is unloaded, for example, using wx.redirectTo redirect a page of the original page has been closed

When initialization or open a new page to perform onLoad, and then perform onShow

But for Tab page, and it is not the same

From A to B is the first request is then onHide onLoad, onShow

OnLoad second request is not executed because B page has been cached, so when you want to see a new page can only be used to refresh onShow

 

Guess you like

Origin www.cnblogs.com/ll15888/p/11640460.html