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) + } + } // 退出登录