From 17caa2d3a5dec66cf9627661f8f2d77790efd771 Mon Sep 17 00:00:00 2001 From: YOU <15501379989@163.com> Date: Fri, 11 Apr 2025 18:58:57 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=88=87=E6=8D=A2=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E6=97=B6=E7=A1=AE=E4=BF=9D=E7=9B=B8=E5=BA=94=E6=8A=BD?= =?UTF-8?q?=E5=B1=89=E5=85=B3=E9=97=AD=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index 33a9c95..b31dcfa 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -56,6 +56,13 @@ router.beforeEach((to, from, next) => { const token = getToken(); const isPop = to.query.pop === 'true'; //新窗口打开内页 NProgress.start(); + + const overLay: IObject | null = document.querySelector('.el-overlay .modify-form'); + + if (overLay && overLay.parentNode) { + overLay.parentNode.remove(); + } + if (to.path !== '/login') { if (store.state.routes.length) { if (to.name === 'error') { @@ -176,7 +183,7 @@ router.beforeEach((to, from, next) => { if (to.meta.requiresAuth) { next('/login'); } else { - next(); + next(); } } } else { @@ -186,12 +193,11 @@ router.beforeEach((to, from, next) => { } } else { store.commit('updateState', { appIsReady: true, appIsRender: true }); - if (import.meta.env.VITE_APP_API_HOME) { + if (import.meta.env.VITE_APP_API_HOME) { window.location.href = import.meta.env.VITE_APP_API_HOME; } else { next(); } - } });