1
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user