登录叶细胞

This commit is contained in:
仲么了
2023-12-22 10:22:22 +08:00
parent 0f7b59f55b
commit 3a465769bc
17 changed files with 596 additions and 257 deletions

View File

@@ -34,6 +34,14 @@ export const adminBaseRoute = {
*/
const staticRoutes: Array<RouteRecordRaw> = [
adminBaseRoute,
{
path: '/',
redirect: (to) => {
return {
name: 'adminMainLoading'
}
}
},
{
// 管理员登录页 - 不放在 adminBaseRoute.children 因为登录页不需要使用后台的布局
path: '/login',
@@ -43,7 +51,6 @@ const staticRoutes: Array<RouteRecordRaw> = [
title: pageTitle('login')
}
},
{
path: '/:path(.*)*',
redirect: '/404'
@@ -56,6 +63,21 @@ const staticRoutes: Array<RouteRecordRaw> = [
meta: {
title: pageTitle('notFound') // 页面不存在
}
},
{
// 后台找不到页面了-可能是路由未加载上
path: adminBaseRoutePath + ':path(.*)*',
redirect: (to) => {
return {
name: 'adminMainLoading',
params: {
to: JSON.stringify({
path: to.path,
query: to.query
})
}
}
}
}
]