From daa3d9edea915514e28c568b7288e6415f02fef4 Mon Sep 17 00:00:00 2001
From: 田源 <tianyuan@vci-tech.com>
Date: 星期二, 07 一月 2025 17:24:20 +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