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 }