Explorar o código

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

zhangyu %!s(int64=6) %!d(string=hai) anos
pai
achega
4197cb1be4
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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')
             }