feat: OTA部分接口对接后端

This commit is contained in:
2026-06-29 13:41:28 +08:00
parent 165f1a40bd
commit 937308e51d
3 changed files with 36 additions and 2 deletions
+10 -1
View File
@@ -198,7 +198,7 @@ const startHomeOtaUpdate = async () => {
}
};
// 点击立即更新时先判断设备是否已通过 WiFi 联网,已联网则首页直接更新,否则跳转 WiFi 页面。
// 点击立即更新时先判断设备是否在线并已通过 WiFi 联网,已联网则首页直接更新,否则跳转 WiFi 页面。
const handleOtaUpdate = async () => {
if (isStartingOta.value) return;
isStartingOta.value = true;
@@ -214,6 +214,15 @@ const handleOtaUpdate = async () => {
return;
}
if (deviceStatus?.online !== true) {
isStartingOta.value = false;
uni.showToast({
title: "请先开启智能弓",
icon: "none",
});
return;
}
if (String(deviceStatus?.netType || "").toLowerCase() === "wifi") {
startHomeOtaUpdate();
return;