From 8f078e4f3021777c9144ef4a347a1e99e5abaebc Mon Sep 17 00:00:00 2001 From: LukeMackin Date: Tue, 21 Jul 2026 22:29:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20manifest=E5=AD=97=E6=AE=B5=E8=A7=84?= =?UTF-8?q?=E8=8C=83=E5=8C=96=20{latest,min=5Fversion,url,sha256}=20+=20v6?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E7=89=88=E6=9C=AC=E5=AF=B9=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - h5_version → latest + min_version(老旧客户端提示需APK升级) - v6 HTML: 去掉硬编码版本号,动态读取页面ver元素比对 - TBD sha256 → 直接拒绝(非空占位符) - 域名校验保留 --- ota/h5/index-v6.html | 15 ++++++++++----- ota/h5/manifest-beta.json | 2 +- ota/h5/manifest-nightly.json | 2 +- ota/h5/manifest-stable.json | 2 +- ota/version.txt | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) 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)