From 3553afdbe35ed5ff5d2ce2a85e90962a01de9a4a Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期六, 21 三月 2026 16:26:43 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/map/http.js | 74 ++++++++++++++++++++++++++++++++++++
1 files changed, 73 insertions(+), 1 deletions(-)
diff --git a/zy-acs-flow/src/map/http.js b/zy-acs-flow/src/map/http.js
index bf59dcc..b0c48b1 100644
--- a/zy-acs-flow/src/map/http.js
+++ b/zy-acs-flow/src/map/http.js
@@ -204,6 +204,78 @@
})
}
+export const getCodeInfo = async (codeData, callback, errCallBack) => {
+ await request.post('/code/info', {
+ codeData,
+ }, {
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+ }).then((res) => {
+ const { code, msg, data } = res.data;
+ if (code === 200) {
+ callback(data);
+ } else {
+ notify?.error(msg);
+ if (errCallBack) {
+ errCallBack();
+ }
+ }
+ }).catch((error) => {
+ notify?.error(error.message);
+ console.error(error.message);
+ if (errCallBack) {
+ errCallBack();
+ }
+ })
+}
+
+export const getCodeRouteList = async (codeData, callback, errCallBack) => {
+ await request.post('/code/route/list', {
+ codeData,
+ }, {
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+ }).then((res) => {
+ const { code, msg, data } = res.data;
+ if (code === 200) {
+ callback(Array.isArray(data) ? data : []);
+ } else {
+ notify?.error(msg);
+ if (errCallBack) {
+ errCallBack();
+ }
+ }
+ }).catch((error) => {
+ notify?.error(error.message);
+ console.error(error.message);
+ if (errCallBack) {
+ errCallBack();
+ }
+ })
+}
+
+export const getCodeFuncStaList = async (codeData, callback, errCallBack) => {
+ await request.post('/code/funcSta/list', {
+ codeData,
+ }, {
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+ }).then((res) => {
+ const { code, msg, data } = res.data;
+ if (code === 200) {
+ callback(Array.isArray(data) ? data : []);
+ } else {
+ notify?.error(msg);
+ if (errCallBack) {
+ errCallBack();
+ }
+ }
+ }).catch((error) => {
+ notify?.error(error.message);
+ console.error(error.message);
+ if (errCallBack) {
+ errCallBack();
+ }
+ })
+}
+
export const getRouteList = async (zoneId, callback, errCallBack) => {
await request.post('/map/route/list', {
zoneId: zoneId,
@@ -511,4 +583,4 @@
console.error(error.message);
}
return null;
-}
\ No newline at end of file
+}
--
Gitblit v1.9.1