zhuliu 1 年之前
父節點
當前提交
ea1875312b
共有 1 個文件被更改,包括 6 次插入1 次删除
  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' })