src/router/index.ts
@@ -98,7 +98,11 @@ if (to.path === '/login' && !token) { next(); NProgress.done(); } else { }else if (to.path === '/tiaochabiao1' && !token) { next(); NProgress.done(); } else { if (!token) { next(`/login?redirect=${to.path}¶ms=${JSON.stringify(to.query ? to.query : to.params)}`); Session.clear();