hejianhao
2025-05-12 c70218175437865de837c52ef37d53d31d203218
去掉路由校验
1个文件已修改
20 ■■■■ 已修改文件
culture/src/router/index.js 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/router/index.js
@@ -346,17 +346,17 @@
    // 登录验证
    // 排除登录页的校验
    if (to.path === "/login") {
        if (sessionStorage.getItem('token')) {
            next('/projectList');  // 已登录状态访问登录页时重定向到系统首页
            return;
        }
        next();
        return;
    }
    // if (to.path === "/login") {
    //     if (sessionStorage.getItem('token')) {
    //         next('/projectList');  // 已登录状态访问登录页时重定向到系统首页
    //         return;
    //     }
    //     next();
    //     return;
    // }
    // 登录状态校验
    const isAuthenticated = sessionStorage.getItem('token');
    // // 登录状态校验
    // const isAuthenticated = sessionStorage.getItem('token');
    // if (!isAuthenticated) {
    //     next('/login');  // 未登录用户重定向到登录页
    //     return;