Micro-channel five applet lifecycle methods and introduction

  onLoad page loads

    A page only called once, to accept the page parameters can be obtained wx.navigateTo and wx.redirectTo and <navigator> in the query.

  onShow page display

    Every time you open the page will be called once.

  onReady initial page rendering is complete

    A page only called once, on behalf of the page has been ready, you can interact and view layer, the interface is set up as wx.setNavigationBarTitle please set after onReady.

  onHide page Hide

    When the call or call navigateTo bottom tab switching.

  onUnload page unload

    When calling redirectTo or navigateBack call.

Guess you like

Origin www.cnblogs.com/banyuege/p/11547041.html