fix: Resolve white screen on data source page refresh

This commit is contained in:
fit2cloud-chenyw
2025-12-30 10:17:38 +08:00
committed by fit2cloud-chenyw
parent 19e9058056
commit ad0b747b47
+6
View File
@@ -34,9 +34,15 @@ export const watchRouter = (router: Router) => {
next('/login')
return
}
let isFirstDynamicPath = false
if (!userStore.getUid) {
await userStore.info()
generateDynamicRouters(router)
isFirstDynamicPath = to?.path === '/ds/index'
if (isFirstDynamicPath) {
next({ ...to, replace: true })
return
}
}
if (to.path === '/' || accessCrossPermission(to)) {
next('/chat')