From a2090da8cc845ddd04600508616ef55767b95b56 Mon Sep 17 00:00:00 2001 From: JayChou Date: Wed, 6 Nov 2024 09:58:01 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=97=A8=E6=88=B7=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 3 ++- .env.production | 3 ++- src/views/course/courseDetails.vue | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.env.development b/.env.development index 53bec93..d475bf6 100644 --- a/.env.development +++ b/.env.development @@ -2,4 +2,5 @@ NODE_ENV = 'development' VITE_APP_TITLE = '无糖运营平台' VITE_APP_BASE_API = 'http://localhost:8080' -# VITE_APP_BASE_API = 'http://10.100.200.177:8080' \ No newline at end of file +# VITE_APP_BASE_API = 'http://10.100.200.177:8080' +VITE_HOME_URL = 'http://localhost:8866/portal' \ No newline at end of file diff --git a/.env.production b/.env.production index d6a6065..13679a5 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,4 @@ NODE_ENV = 'production' VITE_APP_TITLE = '无糖运营平台' -# VITE_APP_BASE_API = '/prod-api' \ No newline at end of file +# VITE_APP_BASE_API = '/prod-api' +VITE_HOME_URL = 'http://localhost:8866/portal' diff --git a/src/views/course/courseDetails.vue b/src/views/course/courseDetails.vue index c3ebd0d..8c5f3c2 100644 --- a/src/views/course/courseDetails.vue +++ b/src/views/course/courseDetails.vue @@ -15,7 +15,7 @@ let nodeID = 0 // 点击节点 const clickGraphChange = async (id: number) => { if (nodeID === id) { - window.open(`http://localhost:8866/portal#/course?id=${Route.query.id}`) + window.open(`${import.meta.env.VITE_HOME_URL}#/course?id=${Route.query.id}`) } else { nodeID = id }