| | |
| | | <script> |
| | | import Cookies from "js-cookie" |
| | | import UpdatePassWord from "./components/updatePassWord" |
| | | import {getApsPage} from '@/common/untils/index.js' |
| | | export default { |
| | | name: "SalesLead", |
| | | props: { |
| | |
| | | |
| | | return type |
| | | }, |
| | | getApsPage() { |
| | | /* getApsPage() { |
| | | // 首页部署在各个环境的端口 |
| | | const loginPathMap = { |
| | | prod: `//${window.location.hostname}:9080`, |
| | |
| | | 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=/;" |
| | |
| | | .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({ |