From 95fb51ceb732a8dc2c36d810e39a8203a778c697 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期一, 15 四月 2024 17:03:40 +0800 Subject: [PATCH] 隐藏官网的ai爆款模块,管理中心模块,为你推荐模块,增加登录按钮 --- src/components/header/index.vue | 38 +++++++++++++++++++++++++++++++++----- 1 files changed, 33 insertions(+), 5 deletions(-) diff --git a/src/components/header/index.vue b/src/components/header/index.vue index 8c1594d..78aee91 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://192.168.20.119: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> @@ -24,13 +25,37 @@ 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(){ + const loginPathMap = { + prod:`//${window.location.hostname}:9080`, + test:`//192.168.20.119:9080`, + dev: `//192.168.8.117:8080` + } + return loginPathMap[this.environmentType()] + }, + }, components: {}, }; </script> @@ -94,9 +119,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