瀏覽代碼

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

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