diff --git a/ota/h5/index-v6.html b/ota/h5/index-v6.html index f9cc722..4738414 100644 --- a/ota/h5/index-v6.html +++ b/ota/h5/index-v6.html @@ -48,11 +48,16 @@ function checkUpdate(){ log('checking '+manFile+' ...'); fetch(BASE+manFile+'?t='+Date.now(),{cache:'no-store'}) .then(function(r){if(!r.ok)throw Error('HTTP '+r.status);return r.json()}) - .then(function(j){log('remote: '+j.h5_version); - dlUrl=j.h5_url;dlSha=j.h5_sha256||''; - if(!dlSha){log('ERR: manifest missing h5_sha256');return} - if(!dlUrl||dlUrl.indexOf(BASE)!==0){log('ERR: invalid h5_url domain');return} - if(j.h5_version!=='0.1.0-dav-android-6'){dlVer=j.h5_version; + .then(function(j){log('latest: '+j.latest+' min: '+j.min_version); + if(j.min_version){ + var v=j.min_version.replace(/[^0-9]/g,''),my=document.getElementById('ver').innerText.replace(/[^0-9]/g,''); + if(parseInt(my)