From 5fc6e09508182701f31f017453b5c116adf40f7f Mon Sep 17 00:00:00 2001
From: wangjuncheng <1>
Date: 星期四, 17 四月 2025 10:44:30 +0800
Subject: [PATCH] change

---
 src/api/hpApi.js |   65 ++++++++++++++++++++++++--------
 1 files changed, 49 insertions(+), 16 deletions(-)

diff --git a/src/api/hpApi.js b/src/api/hpApi.js
index b2e0f5b..1075faf 100644
--- a/src/api/hpApi.js
+++ b/src/api/hpApi.js
@@ -28,21 +28,54 @@
     });
   }, intervalTime);
 }
+
+// 鑾峰彇闅愭偅鐐规竻鍗�
+export async function getDangerPoint(data) {
+  const response = await axios.post("/hp/sinoDzHiddenDangerPoint/getData", {
+    filterObject: {
+      year: 2024, // 鍔ㄦ�佷紶鍏ョ殑骞翠唤鍙傛暟
+    },
+  });
+  console.log("getDangerPoint:", response);
+  return response.data;
+}
+// 鑾峰彇閬块櫓浣嶇疆
+export async function getSafeLocation(data) {
+  const response = await axios.post("/hp/safeHavenLocation/getData", {
+    filterObject: {
+      year: 2024, // 鍔ㄦ�佷紶鍏ョ殑骞翠唤鍙傛暟
+    },
+  });
+  console.log("getSafeLocation:", response);
+  return response.data;
+}
+// 鑾峰彇閬块櫓绾胯矾
+export async function getEscapeRoute(data) {
+  const response = await axios.post("/hp/escapeRoute/getData", {
+    filterObject: {
+      year: 2024, // 鍔ㄦ�佷紶鍏ョ殑骞翠唤鍙傛暟
+    },
+  });
+  console.log("getEscapeRoute:", response);
+  return response.data;
+}
+// 鑾峰彇浼犳劅鍣ㄥ垪琛�
+export async function getSensor(data) {
+  const response = await axios.post("/hp/sensor/getData", {
+    filterObject: {
+      year: 2024, // 鍔ㄦ�佷紶鍏ョ殑骞翠唤鍙傛暟
+    },
+  });
+  console.log("getSensor:", response);
+  return response.data;
+}
 // 鑾峰彇闆ㄩ噺鏁版嵁
-export async function getRainfallData(year) {
-  try {
-    const response = await axios.post("/hp/rainfallCountyCity/getData", {
-      filterObject: {
-        year: 2024, // 鍔ㄦ�佷紶鍏ョ殑骞翠唤鍙傛暟
-      },
-    });
-    console.log("Response:", response); // 鎵撳嵃瀹屾暣鍝嶅簲锛堣皟璇曠敤锛�
-    return response.data; // 鍋囪鍚庣杩斿洖鐨勬暟鎹湪 response.data 涓�
-  } catch (error) {
-    console.error(
-      "Error fetching rainfall data:",
-      error.response ? error.response.data : error.message
-    );
-    throw error; // 鎶涘嚭閿欒浠ヤ究璋冪敤鏂瑰鐞�
-  }
+export async function getRainfallData(data) {
+  const response = await axios.post("/hp/rainfallCountyCity/getData", {
+    filterObject: {
+      year: 2024, // 鍔ㄦ�佷紶鍏ョ殑骞翠唤鍙傛暟
+    },
+  });
+  console.log("getRainfallData:", response);
+  return response.data;
 }

--
Gitblit v1.9.3