charles
2024-07-18 dbab45ef6e56c32ca3b2d286ec5cb7ed0c86bfea
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,13 @@
          .then(() => {
            Cookies.remove("token")
            // window.location.href = 'http://localhost:8080/login'; //本地的智慧工厂-登录页
            window.location.href = "http:" + this.getApsPage() + "/login"
            this.$message({
              type: "success",
              message: "注销成功!"
            })
            });
              setTimeout(()=>{
                  window.open(`//${getApsPage()}/login`);
              },500);
          })
          .catch(() => {
            this.$message({