From 54849757852f6ab40eb17afbd03d1d839b60a38d Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 13 Nov 2023 17:09:15 +0800
Subject: [PATCH] 重复定时和连续执行
---
src/api/manage.ts | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/src/api/manage.ts b/src/api/manage.ts
index 654b988..a22e272 100644
--- a/src/api/manage.ts
+++ b/src/api/manage.ts
@@ -91,15 +91,15 @@
}
// 获取在线设备信息
-export const getDeviceTopo = async function (params:any): Promise<IWorkspaceResponse<any>> {
- const url = `${HTTP_PREFIX_MANAGE}/manage/device`
- const result = await request.get(url, { params })
+export const getDeviceTopo = async function (workspace_id: string): Promise<IWorkspaceResponse<any>> {
+ const url = `${HTTP_PREFIX}/devices/${workspace_id}/devices`
+ const result = await request.get(url)
return result.data
}
// Get Livestream Capacity
-export const getLiveCapacity = async function (body: {}): Promise<IWorkspaceResponse<any>> {
- const url = `${HTTP_PREFIX}/live/capacity`
+export const getLiveCapacity = async function (body:any): Promise<IWorkspaceResponse<any>> {
+ const url = `${HTTP_PREFIX}/live/capacity/${body.id}`
const result = await request.get(url, body)
return result.data
}
@@ -131,8 +131,6 @@
}
export const getUserPage = async function (params: any, body: IPage): Promise<CommonListResponse<any>> {
- console.log(params, '++++++++++++++')
-
const url = `${HTTP_PREFIX}/user/page`
const result = await request.get(url, { params: { ...params, pageNum: body.current, pageSize: body.size } })
return result.data
@@ -155,7 +153,16 @@
const result = await request.delete(url)
return result.data
}
-
+export const UnBind = async function (device_sn: string): Promise<IWorkspaceResponse<any>> {
+ const url = `${HTTP_PREFIX}/devices/${device_sn}/unsubscribeTopic`
+ const result = await request.get(url)
+ return result.data
+}
+export const testBind = async function (device_sn: string): Promise<IWorkspaceResponse<any>> {
+ const url = `${HTTP_PREFIX}/devices/${device_sn}/subscribeTopic`
+ const result = await request.get(url)
+ return result.data
+}
export const getDeviceBySn = async function (workspace_id: string, device_sn: string): Promise<IWorkspaceResponse<any>> {
const url = `${HTTP_PREFIX}/devices/${workspace_id}/devices/${device_sn}`
const result = await request.get(url)
--
Gitblit v1.9.3