From 7e4c95dee70b72cf582e086816589cbd776d8af4 Mon Sep 17 00:00:00 2001 From: 李喆(开发组) <lzhe@yxqiche.com> Date: 星期二, 22 七月 2025 11:30:02 +0800 Subject: [PATCH] 1 --- src/axios.js | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/axios.js b/src/axios.js index ce674c0..07ca7d6 100644 --- a/src/axios.js +++ b/src/axios.js @@ -25,7 +25,7 @@ let isRefreshing = false; // 鏍囪褰撳墠鏄惁姝e湪鍒锋柊token let refreshTokenPromise = null; // 鍒锋柊token鐨凱romise锛岄伩鍏嶉噸澶嶈姹� -axios.defaults.timeout = 10000; +axios.defaults.timeout = 30000; //杩斿洖鍏朵粬鐘舵�佺爜 axios.defaults.validateStatus = function (status) { return status >= 200 && status <= 500; // 榛樿鐨� @@ -113,7 +113,6 @@ const message = res.data.msg || res.data.error_description || '绯荤粺閿欒'; //濡傛灉鍦ㄧ櫧鍚嶅崟閲屽垯鑷catch閫昏緫澶勭悊 if (statusWhiteList.includes(status)) return Promise.reject(res); - // 濡傛灉鏄�401骞朵笖娌℃湁閲嶈瘯杩囷紝灏濊瘯鍒锋柊token if (status === 401 && !config._retry) { config._retry = true; @@ -203,7 +202,7 @@ } // 濡傛灉璇锋眰涓洪潪200鍒欓粯璁ょ粺涓�澶勭悊 - if (status !== 200) { + if (status !== 200 && status != 2) { ElMessage({ message: message, type: 'error', -- Gitblit v1.9.3