xiatian 1 week ago
parent
commit
90e0a49d5d
1 changed files with 5 additions and 10 deletions
  1. 5 10
      src/modules/portal/views/home/Home.vue

+ 5 - 10
src/modules/portal/views/home/Home.vue

@@ -190,13 +190,6 @@
         </el-row>
       </el-form>
     </el-dialog>
-    <a
-      v-show="false"
-      ref="casOut"
-      :href="this.casLogoutUrl"
-      rel="noopener noreferrer"
-      >cas登出</a
-    >
   </el-container>
 </template>
 
@@ -266,7 +259,6 @@ export default {
       }
     };
     return {
-      casLogoutUrl: "#",
       unreadMessageCount: 0,
       userDialog: false,
       passWeakDialog: false,
@@ -359,8 +351,11 @@ export default {
         this.$http
           .get("/api/auth/logout/" + this.user.scode)
           .then((response) => {
-            this.casLogoutUrl = response.data.url;
-            this.$refs.casOut.click();
+            const link = document.createElement("a");
+            link.href = response.data.url;
+            link.rel = "noopener noreferrer";
+            document.body.appendChild(link);
+            link.click();
             this.USER_SIGNOUT();
           })
           .catch((response) => {