weex version update mechanism

weex version update mechanism

step:

1, with the proviso: weex make a switch, for determining whether weex need to open;
2, front-end configuration the overall profile, front-end to generate the corresponding version based on the client version number in advance to be issued in the configuration file, filter rule is: first, based on the client version number of screening satisfied, then reverse lookup, the same page select the highest version number Configuration;
3, the client call interface, transmission parameters (parameter: MD5 value and version number of client profiles), the interface determines whether there is a corresponding profile, need to determine whether the profile issued, the data structure of the configuration file as follows:
{
  "md5": "abd6d8",
  "version": "5.0.0",
  "pages": [
    {
      "page": "activity",
      "h5": "http://xxxx.com/weex/index?page=activity",
      "js": "http://xxxx.com/weex/dist/v4.1.0/activity.weex.js",
      "md5": "cf3edt"
 },
    {
      "page": "activityTemplate",
      "h5": "http://xxxx.com/weex/index?page=activityTemplate",
      "js": "http://xxxx.com/weex/dist/detail/activityTemplate.weex.js",
      "md5": "def35a"
 }
  ]
}
. 4, designated JS weex_page.js form for subsequent determination, i.e., determines the local downloaded JS md5 value corresponding to the configuration file of JS md5 values ​​are identical, if the different downloaded;
Published 14 original articles · won praise 3 · views 30000 +

Guess you like

Origin blog.csdn.net/ioth5/article/details/104240035