This commit is contained in:
2025-10-10 10:06:56 +08:00
parent 4fbe51d625
commit 6f22c9bffd
37 changed files with 2176 additions and 1183 deletions

View File

@@ -2,26 +2,32 @@ import { http } from './http'
export const deviceApi = {
getQuota(username: string) {
return http.get('/api/device/quota', { username })
// 直接调用 RuoYi 后端的设备配额接口
return http.get('/monitor/device/quota', { username })
},
list(username: string) {
return http.get('/api/device/list', { username })
// 直接调用 RuoYi 后端的设备列表接口
return http.get('/monitor/device/list', { username })
},
register(payload: { username: string }) {
return http.post('/api/device/register', payload)
// 直接调用 RuoYi 后端的设备注册接口
return http.post('/monitor/device/register', payload)
},
remove(payload: { deviceId: string }) {
return http.post('/api/device/remove', payload)
// 直接调用 RuoYi 后端的设备移除接口
return http.post('/monitor/device/remove', payload)
},
heartbeat(payload: { username: string; deviceId: string; version?: string }) {
return http.post('/api/device/heartbeat', payload)
// 直接调用 RuoYi 后端的心跳接口
return http.post('/monitor/device/heartbeat', payload)
},
offline(payload: { deviceId: string }) {
return http.post('/api/device/offline', payload)
// 直接调用 RuoYi 后端的离线接口
return http.post('/monitor/device/offline', payload)
}
}