From c3943f317d1f5476d615c241d4f9fe9afd2ff661 Mon Sep 17 00:00:00 2001 From: Fine Date: Tue, 11 Jul 2023 22:27:04 +0800 Subject: [PATCH] feat: update menus --- src/router/index.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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();