zhuliu 1 year ago
parent
commit
ea1875312b
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/router/index.js

+ 6 - 1
src/router/index.js

@@ -614,7 +614,12 @@ router.beforeEach((to, from, next) => {
         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))
+            var redirectUrl = {
+              path:to.path,
+              query:to.query,
+              params:to.params
+            }
+            localStorage.setItem('redirectUrl',JSON.stringify(redirectUrl))
           }
         }
         next({ name: 'Login' })