update:优化ota

This commit is contained in:
2026-09-24 15:16:14 +08:00
parent f8bf9fdb63
commit f4b37fba00
6 changed files with 200 additions and 303 deletions
+6 -7
View File
@@ -599,14 +599,13 @@ export const getDeviceWifiStatusAPI = async () => {
});
};
// 获取硬件盒子版本信息,用于判断当前设备是否需要 OTA 升级。
export const getHardwareBoxVersionAPI = async () => {
return request("GET", "/user/hardwareBox/version");
};
// 发送硬件盒子 OTA 更新指令,服务端会返回后续轮询使用的任务 ID。
export const sendHardwareBoxUpdateAPI = async (data) => {
return request("POST", "/user/hardwareBox/sendUpdate", data);
export const sendHardwareBoxUpdateAPI = async ({versionNumber, wifiSsid, wifiPassword}) => {
return request("POST", "/user/hardwareBox/sendUpdate", {
versionNumber,
wifiSsid,
wifiPassword,
});
};
export const addNoteAPI = async (id, remark) => {