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

Loading…
Cancel
Save