Mini Program Page Startup Process Analysis

 There are actually four kinds of files under pages/logs/logs,

1. The WeChat client will first generate an interface based on the logs.json configuration . You can define the color and text at the top in this json file.

2. Then the client will load the WXML structure and WXSS style of the page.

3. Finally, the client will load logs.js. You can see that the general content of logs.js is:

Page({
  data: { // Data     logs involved in page rendering : []

  },
  onLoad: function () {
     // Execute after page rendering 
  }
})

Page is a page builder that generates a page. When generating the page, the applet framework will render the data data together with index.wxml to produce the final structure, so you get the appearance of the applet you see.

After rendering the interface, the page instance will receive an onLoad callback, where you can handle your logic.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325145440&siteId=291194637