mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 04:58:17 +08:00
OTA 完美
This commit is contained in:
@@ -671,9 +671,10 @@ ota_status.addEventListener('mdl-componentupgraded', function() {
|
||||
function OtaStatus() {
|
||||
HttpGet("/ota", function (re) {
|
||||
var percent = parseInt(re);
|
||||
//console.log(re + " " + parseInt(re));
|
||||
ota_status.MaterialProgress.setProgress(percent);
|
||||
if (percent == 0) {
|
||||
//location.reload();
|
||||
if (percent < 0) {
|
||||
location.reload();
|
||||
}
|
||||
window.setTimeout(OtaStatus, 1000);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user