src/router/index.ts
@@ -92,13 +92,14 @@ // 路由加载前 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 if (to.path === '/tiaochabiao1' && !token) { }else if ((to.path === '/register'||to.path==='/registerSuu') && !token) { next(); NProgress.done(); }