From ceb8b41c37e6a21ed7a01770fd77259d7c28a0a1 Mon Sep 17 00:00:00 2001
From: zhangyongtian <1181606322@qq.com>
Date: Sat, 07 Sep 2024 19:38:49 +0800
Subject: [PATCH] feat: 事件材料

---
 gz-customerSystem/src/api/apiHandler.js |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/gz-customerSystem/src/api/apiHandler.js b/gz-customerSystem/src/api/apiHandler.js
index 0687d2e..a18c67e 100644
--- a/gz-customerSystem/src/api/apiHandler.js
+++ b/gz-customerSystem/src/api/apiHandler.js
@@ -2,8 +2,8 @@
  * @Company: hugeInfo
  * @Author: ldh
  * @Date: 2022-02-16 11:28:12
- * @LastEditTime: 2023-04-25 19:06:37
- * @LastEditors: lwh
+ * @LastEditTime: 2024-09-07 16:45:38
+ * @LastEditors: dminyi 1301963064@qq.com
  * @Version: 1.0.0
  * @Description: axios处理方法
  */
@@ -57,8 +57,8 @@
 	
 	const url =
 		value.service === 'sys'
-			? `${appUrl.fileUrl}/${appUrl[value.service] || ''}/api/v1/${value.url}`
-			: `${appUrl.baseUrl}/${appUrl[value.service] || ''}/api/v1/${value.url}`;
+			? `${appUrl.fileUrl}/${appUrl[value.service] || ''}/api/web/${value.url}`
+			: `${appUrl.baseUrl}/${appUrl[value.service] || ''}/api/web/${value.url}`;
 
 	if (value.type === 'get') {
 		return ax
@@ -70,7 +70,18 @@
 				networkException(err);
 				return { type: false };
 			});
-	} else {
+	} else if (value.type === 'delete') {
+		return ax
+			.delete(url, { params: data, headers: { 'Authorization': token } })
+			.then((response) => {
+				return resHandle(response.data);
+			})
+			.catch((err) => {
+				networkException(err);
+				return { type: false };
+			});
+	}
+	else {
 		return ax
 			.post(url, data, { headers: { 'Authorization': token } })
 			.then((response) => {

--
Gitblit v1.8.0