From 3efcd38c47c327dcd8bd22cd523381d79d08770e Mon Sep 17 00:00:00 2001
From: dminyi <1301963064@qq.com>
Date: Sat, 07 Sep 2024 16:56:44 +0800
Subject: [PATCH] 上传附件
---
gz-customerSystem/src/api/apiHandler.js | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/gz-customerSystem/src/api/apiHandler.js b/gz-customerSystem/src/api/apiHandler.js
index 8fc3402..a18c67e 100644
--- a/gz-customerSystem/src/api/apiHandler.js
+++ b/gz-customerSystem/src/api/apiHandler.js
@@ -2,7 +2,7 @@
* @Company: hugeInfo
* @Author: ldh
* @Date: 2022-02-16 11:28:12
- * @LastEditTime: 2024-08-27 11:18:41
+ * @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