修改uts类型
This commit is contained in:
@@ -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();
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user