修改uts类型

This commit is contained in:
刘辉
2025-09-23 13:22:09 +08:00
parent dfad4ff040
commit 738f44bb14
4 changed files with 9 additions and 10 deletions

View File

@@ -2,15 +2,13 @@ import { router, useStore } from "@/cool";
router.beforeEach((to, _, next) => {
const { user } = useStore();
if (
!to.meta.isAuth
) {
next();
} else {
if (to.meta?.isAuth == true) {
if (!user.isNull()) {
next();
} else {
router.login();
}
} else {
next();
}
});
});