mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-10 18:02:49 +00:00
Update index.ts
This commit is contained in:
parent
981fd22caa
commit
8fbb6732d9
@ -79,8 +79,10 @@ router.beforeEach(async (to: any, from, next) => {
|
||||
|
||||
// 设置首页路由
|
||||
let firstRoute: symbol | string | undefined = findFirstValidRoute(userStore.routers)
|
||||
if (systemStore.apps[0]) {
|
||||
firstRoute = userStore.addonIndexRoute[ systemStore.apps[0].key ]
|
||||
if (systemStore.apps && systemStore.apps.length) {
|
||||
systemStore.apps.forEach(key => {
|
||||
if (userStore.addonIndexRoute[key]) firstRoute = userStore.addonIndexRoute[key]
|
||||
})
|
||||
}
|
||||
|
||||
ROOT_ROUTER.redirect = { name: firstRoute }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user