2025-10-16 18:28:57 +08:00
|
|
|
|
import { isNull, router, useStore } from "@/cool";
|
2025-07-21 16:47:04 +08:00
|
|
|
|
|
2025-09-23 15:59:19 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 路由跳转前的全局钩子(如修改 pages.json 后需重新编译项目以确保路由信息生效)
|
|
|
|
|
|
* @param to 跳转页
|
|
|
|
|
|
* @param from 当前页
|
|
|
|
|
|
* @param next 跳转函数
|
|
|
|
|
|
*/
|
2026-01-21 01:37:34 +08:00
|
|
|
|
// 全局路由拦截 - 已移除强制登录逻辑,支持游客模式浏览
|
2025-09-23 15:59:19 +08:00
|
|
|
|
router.beforeEach((to, from, next) => {
|
2026-01-21 01:37:34 +08:00
|
|
|
|
next();
|
2025-09-23 15:59:19 +08:00
|
|
|
|
});
|