From bbe7a790dea28a0dd86b51cd95c9672c1eeaa345 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期二, 16 四月 2024 14:58:41 +0800 Subject: [PATCH] 1 --- src/components/header/index.vue | 44 +++++++++++++++++++++++++++++++++++++++----- 1 files changed, 39 insertions(+), 5 deletions(-) diff --git a/src/components/header/index.vue b/src/components/header/index.vue index 20cee5c..ef3ab50 100644 --- a/src/components/header/index.vue +++ b/src/components/header/index.vue @@ -9,11 +9,12 @@ </div> <div class="topright"> <a href="">棣栭〉</a> - <a href="http://fai365.com:9080/login">鏅烘収宸ュ巶</a> + <a :href="link">鏅烘収宸ュ巶</a> <a href="">绠$悊涓績</a> <a href="">绠楁硶</a> <a href="">搴旂敤</a> <a href="">绠$悊鏈嶅姟</a> + <span class="right-btn"><a :href="link">鐧诲綍</a></span> </div> </div> </div> @@ -21,16 +22,46 @@ </template> <script> +// import util from "@/libs/util.js"; +// import Cookies from "js-cookie"; export default { props: {}, data() { - return {}; + return { + link:"" + }; }, computed: {}, - created() {}, + created() { + this.link=this.getApsPage() + }, mounted() {}, watch: {}, - methods: {}, + methods: { + environmentType(){ + let type + if (location.href.includes('192.168.20.119')) { + type = 'test' + } else if (location.href.includes('192.168') || location.href.includes('localhost')) { + type = 'dev' + } else { + type = 'prod' + } + return type + }, + getApsPage(){ + // let token = util.cookies.get("token"); + // Cookies.set("token", token, { expires: 7, path: "/" }); + // console.log(util.cookies.get("token"),'==token') + // window.open(`//aps.fai365.com:${getPort()}${this.startPage}`); ${window.location.hostname} + const loginPathMap = { + prod:`//aps.fai365.com:9080`, + test:`//192.168.20.119:9080`, + dev: `//192.168.8.117:8080` + } + return loginPathMap[this.environmentType()] + }, + }, components: {}, }; </script> @@ -94,9 +125,12 @@ } } .topright { - width: 453px; + width: 533px; height: 44px; line-height: 44px; + .right-btn{ + margin-left:40px; + } a { margin-left: 40px; font-size: 14px; -- Gitblit v1.8.0