From a855bc6ae27cec13077bae5a137c93b6c4557f30 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Thu, 12 Jan 2023 11:32:35 +0800
Subject: [PATCH] 首页携带token直接访问设置

---
 src/views/security/security.vue |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/views/security/security.vue b/src/views/security/security.vue
index e000c7c..a418376 100644
--- a/src/views/security/security.vue
+++ b/src/views/security/security.vue
@@ -222,6 +222,14 @@
       return ids.join(",");
     }
   },
+  created(){
+    const tokenLength = window.location.href.indexOf('=');
+    if(tokenLength>0){
+      //取“=”之后的token
+      let z = window.location.href.substring(tokenLength + 1)
+      this.$store.commit('SET_TOKEN', z);
+    }
+  },
   methods: {
     rowSave(row, done, loading) {
       add(row).then(() => {

--
Gitblit v1.9.3