From 1a0e437bd073d428e276a804c6846e409d92a99e Mon Sep 17 00:00:00 2001
From: charles <981744753@qq.com>
Date: 星期四, 18 七月 2024 23:45:56 +0800
Subject: [PATCH] fix:与aps共享token

---
 src/components/layout/components/appHeader/index.vue |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/components/layout/components/appHeader/index.vue b/src/components/layout/components/appHeader/index.vue
index 389d527..fbdbf5a 100644
--- a/src/components/layout/components/appHeader/index.vue
+++ b/src/components/layout/components/appHeader/index.vue
@@ -21,6 +21,7 @@
 <script>
 import Cookies from "js-cookie"
 import UpdatePassWord from "./components/updatePassWord"
+import {getApsPage} from '@/common/untils/index.js'
 export default {
   name: "SalesLeads",
   props: {
@@ -67,7 +68,7 @@
 
       return type
     },
-    getApsPage() {
+   /* getApsPage() {
       // 棣栭〉閮ㄧ讲鍦ㄥ悇涓幆澧冪殑绔彛
       const loginPathMap = {
         prod: `//${window.location.hostname}:9080`,
@@ -76,7 +77,7 @@
         dev: `//192.168.8.113:8080`
       }
       return loginPathMap[this.environmentType()]
-    },
+    },*/
     handleCommand(command) {
       if (command === "logout") {
         // this.$router.push({ path: "/login" })
@@ -89,11 +90,14 @@
           .then(() => {
             Cookies.remove("token")
             // window.location.href = 'http://localhost:8080/login'; //鏈湴鐨勬櫤鎱у伐鍘�-鐧诲綍椤�
-            window.location.href = "http:" + this.getApsPage() + "/login"
+            //window.location.href = "http:" + this.getApsPage() + "/login"
             this.$message({
               type: "success",
               message: "娉ㄩ攢鎴愬姛!"
-            })
+            });
+              setTimeout(()=>{
+                  window.open(`//${getApsPage()}/login`);
+              },500);
           })
           .catch(() => {
             this.$message({

--
Gitblit v1.8.0