diff --git a/src/main.js b/src/main.js index 09e254661bec05ed0c6ecc1ee62c7e0b68f1bef3..f1b1a592b86c69aeee42ae757455fff65ed347b2 100644 --- a/src/main.js +++ b/src/main.js @@ -55,6 +55,10 @@ router.beforeEach((to, from, next) => { router.addRoutes(store.getters.addRouters) // 动æ€æ·»åŠ å¯è®¿é—®è·¯ç”±è¡¨ next({ ...to }); // hack方法 ç¡®ä¿addRouteså·²å®Œæˆ }) + }).catch(() => { + store.dispatch('FedLogOut').then(() => { + next({ path: '/login' }); + }) }) } else { // 没有动æ€æ”¹å˜æƒé™çš„需求å¯ç›´æŽ¥next() åˆ é™¤ä¸‹æ–¹æƒé™åˆ¤æ– ↓