后台根路径自动进入首页

master
weizong song 4 months ago
parent f2fce48ea7
commit d0743c5024

@ -164,9 +164,16 @@ router.beforeEach(async (to) => {
if (!adminDynamicRoutesRegistered()) {
await registerAdminDynamicRoutes(router)
if (to.name === 'AdminLayout' || to.path === '/admin') {
return { name: 'admin-dashboard', replace: true }
}
return { ...to, replace: true }
}
if (to.name === 'AdminLayout' || to.path === '/admin') {
return { name: 'admin-dashboard', replace: true }
}
return true
}

Loading…
Cancel
Save