Weex version update mechanism

Steps:

1. Premise: Make a WEEX switch to determine whether weeX needs to be turned on;
2. Front-end configuration general configuration files. The front-end generates configuration files to be delivered in advance according to the client version number.
3. The client invokes the interface and transmits parameters (including the version number and the MD5 value of the client configuration file). The interface checks whether the corresponding configuration file exists and whether to deliver the configuration file.
{
  "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"}}]Copy the code
4. The JS format is named weex_page. JS for subsequent verification. That is, check whether the MD5 value of the downloaded JS is the same as that of the corresponding JS in the configuration file.