diff --git a/src/router/index.ts b/src/router/index.ts index d58dd753..bf8fe555 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -25,8 +25,8 @@ import { routesSettings } from "./settings"; const routes: Array = [ ...routesMarketplace, ...routesLayers, - ...routesDashboard, ...routesAlarm, + ...routesDashboard, ...routesSettings, ]; @@ -37,8 +37,6 @@ const router = createRouter({ (window as any).axiosCancel = []; -const defaultPath = (routesLayers[0] && routesLayers[0].children[0].path) || ""; - router.beforeEach((to, from, next) => { // const token = window.localStorage.getItem("skywalking-authority"); if ((window as any).axiosCancel.length !== 0) { @@ -49,6 +47,7 @@ router.beforeEach((to, from, next) => { } if (to.path === "/") { + const defaultPath = (routesLayers[0] && routesLayers[0].children[0].path) || ""; next({ path: defaultPath }); } else { next();