Browse Source

如果没有历史登录路由,跳转到根路由

zhangyu 5 years ago
parent
commit
4197cb1be4
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/views/system/auth/index.vue

+ 3 - 1
src/views/system/auth/index.vue

@@ -25,7 +25,9 @@ export default {
                 console.log('last route ', lastRoute)
                 if (lastRoute) {
                     this.$router.replace(lastRoute)
-                } 
+                } else {
+                    this.$router.replace({path: "/"})
+                }
             }else{
                 this.$router.replace('/nouser')
             }