From 9ce7c2a993cd67321885efb01b524567f8901411 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期四, 25 九月 2025 17:03:53 +0800
Subject: [PATCH] gx
---
src/router/index.ts | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/router/index.ts b/src/router/index.ts
index a92deab..ad85cdc 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -92,13 +92,18 @@
// 路由加载前
router.beforeEach(async (to, from, next) => {
+ console.log('to', to);
NProgress.configure({ showSpinner: false });
if (to.meta.title) NProgress.start();
const token = Session.get('token');
if (to.path === '/login' && !token) {
next();
NProgress.done();
- } else {
+ }else if ((to.path === '/register'||to.path==='/registerSuu') && !token) {
+ next();
+ NProgress.done();
+ }
+ else {
if (!token) {
next(`/login?redirect=${to.path}¶ms=${JSON.stringify(to.query ? to.query : to.params)}`);
Session.clear();
--
Gitblit v1.8.0