From 57f63af79046b85cc23b0314ea3bb863992f3ad4 Mon Sep 17 00:00:00 2001
From: fangyuan <527392886@qq.com>
Date: 星期一, 26 十二月 2022 17:25:56 +0800
Subject: [PATCH] 工作台跳转

---
 src/plugins/request.js |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/plugins/request.js b/src/plugins/request.js
index 5d99547..68479af 100644
--- a/src/plugins/request.js
+++ b/src/plugins/request.js
@@ -6,11 +6,12 @@
     timeout: 5000
 });
 
-service.interceptors.request.use(config => {
-    // config.params = { 'token': 'h4loV2PkthqTMtFN' }
-    config.headers = {'token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3NDQ1OTY5OTEsInVzZXJuYW1lIjoiYWRtaW4ifQ.5ZrTdiKMvK_lJJXz2LPeZeXNGjYeCOzlaq7T_YRtC0g'}
-    return config;
-})
+service.interceptors.request.use(
+    config => {
+        config.headers['token'] = window.sessionStorage.getItem('token');
+        return config
+    }
+)
 
 service.interceptors.response.use(
     response => {
@@ -25,4 +26,4 @@
     }
 );
 
-export default service
\ No newline at end of file
+export default service

--
Gitblit v1.8.0