Browse Source

过期删除token

qianlishi 1 year ago
parent
commit
2500486957
1 changed files with 3 additions and 2 deletions
  1. 3 2
      report-ui/src/utils/request.js

+ 3 - 2
report-ui/src/utils/request.js

@@ -38,8 +38,9 @@ service.interceptors.response.use(
           type: 'warning'
           type: 'warning'
         }
         }
       ).then(() => {
       ).then(() => {
-        sessionStorage.clear()
-        localStorage.clear()
+        // sessionStorage.clear()
+        // localStorage.clear()
+        localStorage.removeItem('AJReportToken')
         window.location.href = "/";
         window.location.href = "/";
       })
       })
     }
     }