diff --git a/packages/client-android/android/app/src/main/assets/frame.html b/packages/client-android/android/app/src/main/assets/frame.html index 3d3f7be..e6ad850 100644 --- a/packages/client-android/android/app/src/main/assets/frame.html +++ b/packages/client-android/android/app/src/main/assets/frame.html @@ -27,7 +27,7 @@ function checkUpdate(){ var j=JSON.parse(Android.fetchManifest(channel)); if(j.error){log('ERR: '+j.error);return} var h5=j.h5;log('latest: '+h5.latest+' min: '+h5.min_version); - var apk=j.apk;if(apk){var curCode=parseInt((document.getElementById('ver').innerText.match(/(\d+)$/)||[0])[0]);if(apk.versionCode>curCode){log('APK UPDATE: v'+apk.version+' (code '+apk.versionCode+')');document.getElementById('apkLink').innerHTML='Download APK v'+apk.version+'';document.getElementById('apkLink').style.display='block'}} + var apk=j.apk;if(apk){var m=(document.getElementById('ver').innerText||'').match(/(\d+)$/);if(m){var curCode=parseInt(m[0]);if(apk.versionCode>curCode){log('APK UPDATE:v'+apk.version);document.getElementById('apkLink').innerHTML='Download APK v'+apk.version+'';document.getElementById('apkLink').style.display='block'}}} var v=(h5.min_version||'').replace(/[^0-9]/g,''),my=(document.getElementById('ver').innerText||'').replace(/[^0-9]/g,''); if(parseInt(my||'0')