diff --git a/src/utils/auth.js b/src/utils/auth.js index 0566c531c..01775a9a2 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -5,13 +5,13 @@ const TokenKey = 'Admin-Token'; // 设置教学,实训,仿真系统token, 设置城市轨道交通设计平台token export function getToken() { - return localStorage.getItem(TokenKey); + return SessionStorage.getItem(TokenKey); } export function setToken(token) { - return localStorage.setItem(TokenKey, token); + return SessionStorage.setItem(TokenKey, token); } export function removeToken() { - return localStorage.removeItem(TokenKey); + return SessionStorage.removeItem(TokenKey); } // 操作sessionStorage