From cb0b9b81c668a4b03dfa8da30a0d3c14302d25fe Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 23 二月 2024 12:37:55 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/App.jsx |   25 +++++++++++++++++++++----
 1 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/zy-asrs-flow/src/App.jsx b/zy-asrs-flow/src/App.jsx
index 02295e0..1472df8 100644
--- a/zy-asrs-flow/src/App.jsx
+++ b/zy-asrs-flow/src/App.jsx
@@ -6,7 +6,7 @@
 import defaultSettings from '../config/defaultSettings';
 import { errorConfig } from './requestErrorConfig';
 import { getRemoteMenu, getRoutersInfo, getUserInfo, setRemoteMenu, patchRouteWithRemoteMenus } from './services/route';
-import { getToken } from '@/utils/token-util'
+import { getToken, setToken } from '@/utils/token-util'
 import { TOKEN_HEADER_NAME, TOKEN_STORE_NAME } from '@/config/setting';
 import { API_BASE_URL } from '@/config/setting'
 import { message } from 'antd';
@@ -15,6 +15,9 @@
 const loginPath = '/user/login';
 const defaultAvatar = 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png'
 
+// https://xflow.antv.vision/zh-CN/docs/tutorial/solutions/dag DAG 娴佺▼鍥�
+// https://ant-design.antgroup.com/components/table-cn 琛ㄦ牸
+// https://procomponents.ant.design/components/form 琛ㄥ崟pro
 export function render(oldRender) {
   const token = getToken();
   if (!token || token?.length === 0) {
@@ -102,7 +105,7 @@
       },
     },
     waterMarkProps: {
-      content: initialState?.currentUser?.nickname,
+      // content: initialState?.currentUser?.nickname,
     },
     footerRender: () => <Footer />,
     onPageChange: () => {
@@ -112,6 +115,18 @@
         history.push(loginPath);
       }
     },
+    // token: {
+    //   bgLayout: '#fff',
+    //   header: {
+    //     colorBgHeader: '#fff',
+    //   },
+    //   sider: {
+    //     colorMenuBackground: '#fff',
+    //   },
+    //   pageContainer: {
+    //     colorBgPageContainer: '#fff',
+    //   },
+    // },
     bgLayoutImgList: [
       {
         src: 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/D2LWSqNny4sAAAAAAAAAAAAAFl94AQBr',
@@ -182,7 +197,6 @@
   // 鍓嶇疆瀹堝崼
   requestInterceptors: [
     (url, options) => {
-      console.log('request ====>:', url);
       const token = getToken();
       if (token && options.headers) {
         options.headers[TOKEN_HEADER_NAME] = token;
@@ -200,7 +214,10 @@
         // }));
         history.push(loginPath)
       }
-      console.log(response);
+      const token = response.headers[TOKEN_HEADER_NAME];
+      if (token) {
+        setToken(token);
+      }
       return response;
     }
   ]

--
Gitblit v1.9.1