MUI version is updated and some js,css are not written.
First, the app side
1.APP HTML code
<class= "Mui-table-view-cell"><ID = "Update" href = "#feedback" class = "Mui-navigate-right" > version update </a></li>
View Code
2.app JS Code
//=================update= //Check for Updatesdocument.getElementById ("Update"). AddEventListener (' Tap ',function() { varServer = "Http://chunfang740.xicp.net";//Get Upgrade description file server addressConsole.log (plus.runtime.appid); Console.log (plus.runtime.version); Console.log (Plus.device.imei); Mui.getjson (server, {"AppID": Plus.runtime.appid,"Version": Plus.runtime.version,"IMEI": Plus.device.imei},function(data) {if(data.status) {plus.ui.confirm (Data.note,function(i) {if(0 = =i) {Plus.runtime.openURL (Data.url); }}, Data.title, ["Update Now", "Cancel"]); } Else{mui.toast (' ibox365 is the latest version ~ ') } }); }); //=========================View Code
Second, the server code
1. Build a index.php file
<?PHP$appid=$_get[' AppID '];$version=$_get[' Version '];if(isset($appid) &&isset($version)) { //app upgrade only for a specific ID if($appid= = "Ibox365"){ $content=file_get_contents(' Update.json '); $info= Json_decode ($content); if($version!==$info->{' Version '}){ Exit($content); } }} Exit(' {' status ': 0} ');?>View Code
2. Build a Update.json
{ "status": 1, "version": "1.0.2", " title": "ibox365 version Update", "note": "Optimize some bugs, stability better;", " url": " http://chunfang740.xicp.net/ibox365.apk "}
View Code
3. Place the APK file in the server directory.
MUI version Update