疏通跳转问题
This commit is contained in:
@@ -31,7 +31,9 @@ export default loadApps().then(() => createRouter({
|
|||||||
//全局路由守卫
|
//全局路由守卫
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
console.log('%s=>%s', from.name, to.name)
|
console.log('%s=>%s', from.name, to.name)
|
||||||
if (getToken()) {
|
if (to.name == "工作台") {
|
||||||
|
next()
|
||||||
|
} else if (getToken()) {
|
||||||
next({name: "工作台"})
|
next({name: "工作台"})
|
||||||
} else if (to.name != '登录') {
|
} else if (to.name != '登录') {
|
||||||
next({name: "登录"})
|
next({name: "登录"})
|
||||||
|
|||||||
Reference in New Issue
Block a user