Browse Source

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

zhangyu 6 năm trước cách đây
mục cha
commit
4197cb1be4
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  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')
             }