mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-23 23:53:55 +08:00
fix: 修复设备管理无法提交备注信息的问题。
chore: 将设备自动更新状态接口重构为设备信息更新接口,以此实现备注、自动更新合并在一个接口内
This commit is contained in:
@@ -51,10 +51,11 @@ export default {
|
||||
});
|
||||
}).send();
|
||||
},
|
||||
enableOtaUpgrade(id, status, callback) {
|
||||
updateDeviceInfo(id, payload, callback) {
|
||||
RequestService.sendRequest()
|
||||
.url(`${getServiceUrl()}/device/enableOta/${id}/${status}`)
|
||||
.url(`${getServiceUrl()}/device/update/${id}`)
|
||||
.method('PUT')
|
||||
.data(payload)
|
||||
.success((res) => {
|
||||
RequestService.clearRequestTime()
|
||||
callback(res)
|
||||
@@ -63,7 +64,7 @@ export default {
|
||||
console.error('更新OTA状态失败:', err)
|
||||
this.$message.error(err.msg || '更新OTA状态失败')
|
||||
RequestService.reAjaxFun(() => {
|
||||
this.enableOtaUpgrade(id, status, callback)
|
||||
this.updateDeviceInfo(id, payload, callback)
|
||||
})
|
||||
}).send()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user