From 8a346ed81443940dc440c639e8e0a955ead732e5 Mon Sep 17 00:00:00 2001 From: admin <417727563@qq.com> Date: Wed, 6 Nov 2024 10:44:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .env.production | 3 ++- src/Layout/tabbar/index.vue | 11 ++++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.env.development b/.env.development index c1c0793..3bbdd0b 100644 --- a/.env.development +++ b/.env.development @@ -3,4 +3,4 @@ NODE_ENV = 'development' VITE_APP_TITLE = '教学一体化平台' VITE_APP_BASE_API = 'http://127.0.0.1:8080' # VITE_APP_BASE_API = 'http://10.100.200.177:8080' -VITE_ADMIN_URL = 'http://127.0.0.1:8080' \ No newline at end of file +VITE_ADMIN_URL = '182.92.169.222/portalhome' diff --git a/.env.production b/.env.production index f993082..1cf1e8a 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,5 @@ NODE_ENV = 'production' VITE_APP_TITLE = '教学一体化平台' # VITE_APP_BASE_API = '/api' -VITE_ADMIN_URL = 'http://127.0.0.1:8080' \ No newline at end of file +VITE_ADMIN_URL = 'http://127.0.0.1:8080' +VITE_ADMIN_URL = 'http://127.0.0.1/portalhome' \ No newline at end of file diff --git a/src/Layout/tabbar/index.vue b/src/Layout/tabbar/index.vue index 7de3e8e..8540157 100644 --- a/src/Layout/tabbar/index.vue +++ b/src/Layout/tabbar/index.vue @@ -97,7 +97,16 @@ userGetInfoService(userStore.token).then((res) => { }) function skip() { // location.replace(url) - window.open(import.meta.env.VITE_ADMIN_URL) + const adminUrl = import.meta.env.VITE_ADMIN_URL; + if (adminUrl) { + // 根据需求选择下面的其中一个方法 + // 同一窗口跳转 + location.href = adminUrl; + // 新窗口打开 + // window.open(adminUrl, '_blank'); + window.open(import.meta.env.VITE_ADMIN_URL) + } + } // 退出登录