From 3457bf08eae9d9453c88dd62991c3e286eb1df4b Mon Sep 17 00:00:00 2001 From: 田源 <tianyuan@vci-tech.com> Date: 星期四, 26 十二月 2024 10:53:52 +0800 Subject: [PATCH] 个人信息页面&&管理功能模块图标更改 --- Source/plt-web/plt-web-ui/src/router/axios.js | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/router/axios.js b/Source/plt-web/plt-web-ui/src/router/axios.js index bfe6a01..37a5615 100644 --- a/Source/plt-web/plt-web-ui/src/router/axios.js +++ b/Source/plt-web/plt-web-ui/src/router/axios.js @@ -17,7 +17,7 @@ import 'nprogress/nprogress.css'; //榛樿瓒呮椂鏃堕棿 -axios.defaults.timeout = 10000; +axios.defaults.timeout = 30000; //杩斿洖鍏朵粬鐘舵�佺爜 axios.defaults.validateStatus = function (status) { return status >= 200 && status <= 500; @@ -66,7 +66,18 @@ //濡傛灉鍦ㄧ櫧鍚嶅崟閲屽垯鑷catch閫昏緫澶勭悊 if (statusWhiteList.includes(status)) return Promise.reject(res); //濡傛灉鏄�401鍒欒烦杞埌鐧诲綍椤甸潰 - if (status === 401) store.dispatch('FedLogOut').then(() => router.push({path: '/login'})); + if (status === 401) { + store.dispatch('FedLogOut').then(() => router.push({path: '/login'})); + if(router.history.current.path!='/login'){ + Message({ + message: '浼氳瘽杩囨湡锛岃閲嶆柊鐧诲綍', + type: 'error' + }); + return Promise.reject(new Error(message)) + }else { + return Promise.reject() + } + } // 濡傛灉璇锋眰涓洪潪200鍚﹁�呴粯璁ょ粺涓�澶勭悊 if (status !== 200) { Message({ -- Gitblit v1.9.3