|
@@ -610,7 +610,13 @@ router.beforeEach((to, from, next) => {
|
|
|
if (to.meta.title) {
|
|
|
document.title = to.meta.title;
|
|
|
}
|
|
|
- next({ name: 'Login', params: { redirect: to.fullPath } })
|
|
|
+ if(to.matched && to.matched.length>0){
|
|
|
+ var path = to.path
|
|
|
+ if(to.matched.findIndex(item=>{ return item.path == path}) !=-1){
|
|
|
+ localStorage.setItem('redirectUrl',JSON.stringify(to))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ next({ name: 'Login' })
|
|
|
break
|
|
|
default:
|
|
|
if (to.meta.title) {
|