From ec3c634630d4fc44c01bf4e5902c7f9fee67adab Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Wed, 02 Apr 2025 18:11:13 +0800
Subject: [PATCH] feat:对接机巢状态和直播功能以及ws
---
src/api/home/machineNest.js | 47 +++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 43 insertions(+), 4 deletions(-)
diff --git a/src/api/home/machineNest.js b/src/api/home/machineNest.js
index 099d912..e683a0f 100644
--- a/src/api/home/machineNest.js
+++ b/src/api/home/machineNest.js
@@ -1,10 +1,49 @@
import request from '@/axios';
-// 机巢列表
+// 机巢统计
export const getDeviceInfoNum = () => {
return request({
- url: '/manage/api/v1/devices/getDeviceInfoNum',
- method: 'post',
+ url: '/drone-device-core/manage/api/v1/devices/getDeviceInfoNum',
+ method: 'get',
params: {},
});
-};
\ No newline at end of file
+};
+// 机巢列表
+export const selectDevicePage = ({ nickname,is_execute, ...params}) => {
+ return request({
+ url: `/drone-device-core/manage/api/v1/devices/selectDevicePage?type=${params.type}¤t=${params.current}&size=${params.size}`,
+ method: 'post',
+ data: {
+ nickname,
+ is_execute,
+ },
+ });
+};
+// 机巢数据
+export const getFlightStatistics = (dockSn) => {
+ return request({
+ url: `/drone-device-core/manage/api/v1/devices/getFlightStatistics?dockSn=${dockSn}`,
+ method: 'get',
+ params: {},
+ });
+};
+// 机巢直播/无人机直播 均可使用
+export const liveStart = (deviceSn) => {
+ return request({
+ url: `/drone-device-core/manage/api/v1/live/streams/liveStart?deviceSn=${deviceSn}`,
+ method: 'post',
+ data: {},
+ headers: {
+ 'areaCode': '',
+ },
+ });
+};
+// 单个机巢获取机巢详情
+export const getDeviceDetail = (deviceSn) => {
+ return request({
+ url: `/drone-device-core/manage/api/v1/devices/getDeviceDetail?deviceSn=${deviceSn}`,
+ method: 'get',
+ params: {},
+ });
+};
+
--
Gitblit v1.9.3