diff --git a/app.json b/app.json index 27c2093..88435f5 100644 --- a/app.json +++ b/app.json @@ -33,7 +33,7 @@ "style": "v2", "plugins": { "ppScale-plugin": { - "version": "0.0.22", + "version": "0.0.23", "provider": "wx0826af4e4908f524" } }, diff --git a/components/configureDevice_4/configureDevice_4.js b/components/configureDevice_4/configureDevice_4.js index 6be6523..e609f67 100644 --- a/components/configureDevice_4/configureDevice_4.js +++ b/components/configureDevice_4/configureDevice_4.js @@ -19,16 +19,15 @@ Component({ this._otaCompleted = false; // status: false = 成功,true = 失败 - activeProtocol.codeOtaUpdate((_res, status) => { - console.log('OTA status 回调:', status); + activeProtocol.codeOtaUpdate((status) => { // 延迟 3 秒,让 Loading 多转一会再收口 setTimeout(() => { - if (status) { - // status true → 升级失败 - this._finish(false, '固件升级失败'); - } else { + if (status == 0) { // status false → 升级成功 this._finish(true); + } else { + // status true → 升级失败 + this._finish(false, '固件升级失败'); } }, 3000); });