From 0b3eb25a628193776a89505232e85f0f5b03c5f5 Mon Sep 17 00:00:00 2001 From: 17792275749 <812100002@qq.com> Date: Thu, 9 Apr 2026 11:07:54 +0800 Subject: [PATCH] =?UTF-8?q?[AI=20Generated]:=20fix(Comp):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20OTA=20=E5=9B=9E=E8=B0=83=E5=8F=82=E6=95=B0=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BB=A5=20status=3D=3D0?= =?UTF-8?q?=20=E4=B8=BA=E6=88=90=E5=8A=9F=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 2 +- components/configureDevice_4/configureDevice_4.js | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) 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); });