@@ -80,6 +80,12 @@ router.beforeEach(async (to, from, next) => {
next()
return false
} else {
+ if (!token) {
+ next({
+ path: '/slogin'
+ })
+ return false
+ }
if (to.query.token) {
afterLogin(to.query.token)
@@ -90,12 +96,6 @@ router.beforeEach(async (to, from, next) => {
fullPageTool.check(to)
}
- if (!token) {
- next({
- path: '/slogin'
- })
- return false
- }
// 整页路由处理
if (to.meta.fullpage) {
to.matched = [to.matched[to.matched.length - 1]]