From f971ff5f338eff3778a408096539660b72ba6ae2 Mon Sep 17 00:00:00 2001 From: zxl <763096477@qq.com> Date: 星期四, 28 八月 2025 14:25:44 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- manager/src/libs/axios.js | 28 ++++++++++++++++++++-------- 1 files changed, 20 insertions(+), 8 deletions(-) diff --git a/manager/src/libs/axios.js b/manager/src/libs/axios.js index f5ccf84..be90be5 100644 --- a/manager/src/libs/axios.js +++ b/manager/src/libs/axios.js @@ -16,12 +16,15 @@ ? BASE.API_DEV.manager : BASE.API_PROD.manager) + BASE.PREFIX; // 鏂囦欢涓婁紶鎺ュ彛 -export const uploadFile = commonUrl + "/common/common/upload/file"; +export const uploadFile = commonUrl + "/common/lmk/file/upload"; const service = axios.create({ timeout: 8000, - baseURL: managerUrl + baseURL: managerUrl, + headers: { + accessToken: getStore("accessToken") + }, }); var isRefreshToken = 0; const refreshToken = getTokenDebounce(); @@ -57,8 +60,8 @@ } switch (data.code) { case 400: - if (data.message !== null) { - Message.error(data.message); + if (data.msg !== null) { + Message.error(data.msg); } else { Message.error("绯荤粺寮傚父"); } @@ -69,8 +72,8 @@ Cookies.set("userInfoManager", ""); setStore("accessToken", ""); if (router.history.current.name != "login") { - if (data.message !== null) { - Message.error(data.message); + if (data.msg !== null) { + Message.error(data.msg); } else { Message.error("鏈煡閿欒锛岃閲嶆柊鐧诲綍"); } @@ -80,8 +83,8 @@ break; case 500: // 绯荤粺寮傚父 - if (data.message !== null) { - Message.error(data.message); + if (data.msg !== null) { + Message.error(data.msg); } else { Message.error("绯荤粺寮傚父"); } @@ -330,6 +333,15 @@ }); }; +export const uploadFileByLmk = (params) =>{ + return service({ + url: "/common/upload/file", + method: "POST", + headers:{'Content-Type': 'multipart/form-data'}, + data: params + }) +} + /** * 鏃犻渶token楠岃瘉鐨勮姹� 閬垮厤鏃oken杩囨湡瀵艰嚧璇锋眰澶辫触 * @param {*} url -- Gitblit v1.8.0