From 9d3f1aa7571cd532c0c27bf8376ebf4b2178a252 Mon Sep 17 00:00:00 2001 From: charles <981744753@qq.com> Date: 星期三, 24 七月 2024 17:45:45 +0800 Subject: [PATCH] fix:解决srm之前改了域名,处理各种异常状态,跳转也会出现异常等问题。 --- src/components/layout/components/appHeader/index.vue | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/layout/components/appHeader/index.vue b/src/components/layout/components/appHeader/index.vue index 51bd45b..0095e5f 100644 --- a/src/components/layout/components/appHeader/index.vue +++ b/src/components/layout/components/appHeader/index.vue @@ -22,6 +22,7 @@ <script> import Cookies from "js-cookie" import UpdatePassWord from "./components/updatePassWord" +import {getApsPage} from '@/common/untils/index.js' export default { name: "SalesLead", props: { @@ -65,18 +66,17 @@ return type }, - getApsPage() { + /* getApsPage() { // 棣栭〉閮ㄧ讲鍦ㄥ悇涓幆澧冪殑绔彛 const loginPathMap = { prod: `//${window.location.hostname}:9080`, test: `//192.168.20.119:9080`, // 鎯宠烦鍒版湰鍦板惎鍔ㄧ殑鐧诲綍椤电殑璇濋渶瑕佹妸dev鏀规垚浣犳湰鍦伴」鐩矾寰� - dev: `//192.168.20.158:8080` + dev: `//192.168.8.117:8080` } return loginPathMap[this.environmentType()] - }, + },*/ handleCommand(command) { - console.log(command) if (command === "logout") { // this.$router.push({ path: "/login" }) document.cookie = "cookieName=; path=/;" @@ -88,11 +88,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