From 714696d5a169d9a39b4dc7d0237287c9a81630f4 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期二, 09 十二月 2025 16:35:06 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/map/http.js | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/zy-acs-flow/src/map/http.js b/zy-acs-flow/src/map/http.js
index b126eed..7fc2322 100644
--- a/zy-acs-flow/src/map/http.js
+++ b/zy-acs-flow/src/map/http.js
@@ -372,4 +372,42 @@
console.error(error.message);
}
return false;
+}
+
+
+export const fetchZoneList = async (zoneId) => {
+ try {
+ const res = await request.post('/map/zone/list', {
+ zoneId: zoneId,
+ }, {
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+ });
+ const { code, msg, data } = res.data;
+ if (code === 200) {
+ return data || [];
+ } else {
+ notify.error(msg);
+ return [];
+ }
+ } catch (error) {
+ notify.error(error.message);
+ console.error(error.message);
+ return [];
+ }
+}
+
+export const saveZoneData = async (zoneId, zoneData) => {
+ try {
+ const res = await request.post('/map/zone/save', {
+ zoneId: zoneId,
+ zone: zoneData,
+ });
+ const { code, msg } = res.data;
+ if (code !== 200) {
+ notify.error(msg);
+ }
+ } catch (error) {
+ notify.error(error.message);
+ console.error(error.message);
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1