From 2800fa4f32f3900509cb4d6eefaf2bfaf54efdd7 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Mon, 21 Apr 2025 18:29:09 +0800
Subject: [PATCH] fix: 天气显示

---
 src/api/home/machineNest.js |   64 ++++++++++++++++++++++++++------
 1 files changed, 52 insertions(+), 12 deletions(-)

diff --git a/src/api/home/machineNest.js b/src/api/home/machineNest.js
index 41fcb4f..7c7cf8a 100644
--- a/src/api/home/machineNest.js
+++ b/src/api/home/machineNest.js
@@ -1,30 +1,70 @@
-import request from '@/axios';
+import request from '@/axios'
 
 // 机巢统计
-export const getDeviceInfoNum = (params) => {
+export const getDeviceInfoNum = params => {
   return request({
     url: '/drone-device-core/manage/api/v1/devices/getDeviceInfoNum',
     method: 'get',
     params,
-  });
-};
+  })
+}
 // 机巢列表
-export const selectDevicePage = ({ nickname,is_execute, ...params}) => {
+export const selectDevicePage = ({ nickname, ...params }) => {
   return request({
     url: `/drone-device-core/manage/api/v1/devices/selectDevicePage?type=${params.type}&current=${params.current}&size=${params.size}`,
     method: 'post',
     data: {
       nickname,
-      is_execute,
     },
-    params,
-  });
-};
+  })
+}
 // 机巢数据
-export const getFlightStatistics = (dockSn) => {
+export const getFlightStatistics = dockSn => {
   return request({
     url: `/drone-device-core/manage/api/v1/devices/getFlightStatistics?dockSn=${dockSn}`,
     method: 'get',
     params: {},
-  });
-};
+  })
+}
+// 机巢直播/无人机直播 均可使用
+export const liveStart = (deviceSn, quality) => {
+  return request({
+    url: `/drone-device-core/manage/api/v1/live/streams/liveStart?deviceSn=${deviceSn}&quality=${quality}`,
+    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: {},
+  })
+}
+
+
+
+// 设备-事件列表
+export const getDeviceEventList = (data, params) => {
+  return request({
+    url: `/drone-device-core/jobEvent/eventPage`,
+    method: 'post',
+    data,
+    params
+  })
+}
+
+// 事件列表---点位上图
+export const getEventList = (data, params) => {
+  return request({
+    url: '/drone-device-core/jobEvent/eventList',
+    method: 'post',
+    data,
+    params
+  })
+}
+

--
Gitblit v1.9.3