From 773202dedf12895e365d03dcdedde949514fc956 Mon Sep 17 00:00:00 2001 From: zhangyongtian <1181606322@qq.com> Date: Sun, 08 Sep 2024 11:20:13 +0800 Subject: [PATCH] Merge branch 'master' of http://120.79.193.119:9090/r/gzzfw/frontEnd/gzDyh --- 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