Browse Source

isSinglePage处理

master
安虹睿 1 year ago
parent
commit
515bbb6304
  1. 18
      Code/Fe/src/permission.js

18
Code/Fe/src/permission.js

@ -35,7 +35,7 @@ router.beforeEach(async (to, from, next) => {
console.log('有store.getters.currentUserInfo',store.getters.currentUserInfo)
if(store.getters.permission_routes && store.getters.permission_routes.length > 0){
console.log('有store.getters.permission_routes',store.getters.permission_routes)
next()
next()
}
else{
console.log('没有store.getters.permission_routes',store.getters.permission_routes)
@ -46,6 +46,7 @@ router.beforeEach(async (to, from, next) => {
query:{
loginName:to.query.loginName,
isAutoLogin:to.query.isAutoLogin,
isSinglePage:to.query.isSinglePage
},
replace: true
})
@ -61,6 +62,7 @@ router.beforeEach(async (to, from, next) => {
query:{
loginName:to.query.loginName,
isAutoLogin:to.query.isAutoLogin,
isSinglePage:to.query.isSinglePage
},
replace: true
})
@ -84,6 +86,7 @@ router.beforeEach(async (to, from, next) => {
query:{
loginName:to.query.loginName,
isAutoLogin:to.query.isAutoLogin,
isSinglePage:to.query.isSinglePage
},
replace: true
})
@ -92,6 +95,7 @@ router.beforeEach(async (to, from, next) => {
path:'/login',
query:{
isAutoLogin:to.query.isAutoLogin,
isSinglePage:to.query.isSinglePage
},
replace: true
})
@ -101,6 +105,15 @@ router.beforeEach(async (to, from, next) => {
})
}else{
next()
// next({
// ...to,
// query:{
// loginName:to.query.loginName,
// isAutoLogin:to.query.isAutoLogin,
// isSinglePage:to.query.isSinglePage
// },
// replace: true
// })
}
// })
// .catch((error) => {
@ -116,6 +129,7 @@ router.beforeEach(async (to, from, next) => {
query:{
isAutoLogin:to.query.isAutoLogin,
loginName:to.query.loginName,
isSinglePage:to.query.isSinglePage
},
replace: true
})
@ -130,7 +144,7 @@ router.beforeEach(async (to, from, next) => {
// },
// replace: true
// })
next()
next()
}
}
NProgress.done()

Loading…
Cancel
Save