更新模板

This commit is contained in:
2026-01-21 01:37:34 +08:00
parent b7be8c51bf
commit c5c73828bd
83 changed files with 8687 additions and 1235 deletions

View File

@@ -6,18 +6,7 @@ import { isNull, router, useStore } from "@/cool";
* @param from 当前页
* @param next 跳转函数
*/
// 全局路由拦截 - 已移除强制登录逻辑,支持游客模式浏览
router.beforeEach((to, from, next) => {
const { user } = useStore();
// 判断是否需要登录
if (to.isAuth == true || (isNull(to.meta) ? true : to.meta.isAuth == true)) {
// 如果用户信息为空,则跳转到登录页
if (!user.isNull()) {
next();
} else {
router.login();
}
} else {
next();
}
next();
});