panlinlin
2021-04-19 41ca4e938d63027931447ebe343f47366194cac2
web_src/src/App.vue
@@ -21,6 +21,7 @@
  created() {
    if(!this.$cookies.get("session")){
      //如果没有登录状态则跳转到登录页
      console.log("33333333")
      this.$router.push('/login');
    }
  },
@@ -42,6 +43,7 @@
      //cookie操作方法在源码里有或者参考网上的即可
      if(!this.$cookies.get("session")){
        //如果没有登录状态则跳转到登录页
        console.log("222222222")
        this.$router.push('/login');
      }
    },