Merge pull request #999 from xinnan-tech/auto-ota-update

Auto ota update
This commit is contained in:
hrz
2025-04-25 17:56:47 +08:00
committed by GitHub
parent e805a6e037
commit f555eae653
13 changed files with 197 additions and 83 deletions
@@ -51,4 +51,20 @@ export default {
});
}).send();
},
enableOtaUpgrade(id, status, callback) {
RequestService.sendRequest()
.url(`${getServiceUrl()}/device/enableOta/${id}/${status}`)
.method('PUT')
.success((res) => {
RequestService.clearRequestTime()
callback(res)
})
.fail((err) => {
console.error('更新OTA状态失败:', err)
this.$message.error(err.msg || '更新OTA状态失败')
RequestService.reAjaxFun(() => {
this.enableOtaUpgrade(id, status, callback)
})
}).send()
},
}