diff --git a/src/main.js b/src/main.js index aeddc2492..4183044d7 100644 --- a/src/main.js +++ b/src/main.js @@ -65,6 +65,12 @@ import VConsole from 'vuex' import isMobile from "./store/isMobile"; // 路由拦截 router.beforeEach(function (to, from, next) { + + let fromName = from.name + if(fromName === undefined || fromName === null){ + window.sessionStorage.clear() + } + let toName = to.name if (toName === 'CheckPage') { next() @@ -75,7 +81,6 @@ router.beforeEach(function (to, from, next) { window.location.href = ssoLoginUrlDev } - let fromName = from.name let token = store.state.token let path = to.path; let userName = ""