lrf402788946 il y a 4 ans
Parent
commit
e2bcc8e497
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6 0
      src/views/index.vue

+ 6 - 0
src/views/index.vue

@@ -68,8 +68,14 @@ export default {
     }
   },
   computed: {
+    token() {
+      return this.$route.query.token;
+    },
     ...mapState(['user']),
   },
+  created() {
+    if (!user && this.token) this.$router.push({ path: '/login', query: { token: this.token } });
+  },
   mounted() {
     this.title = this.$route.meta.title;
     this.isleftarrow = this.$route.meta.isleftarrow;