配置门户环境变量

develoop
JayChou 2 weeks ago
parent 0b72ff3bd8
commit a2090da8cc
  1. 3
      .env.development
  2. 3
      .env.production
  3. 2
      src/views/course/courseDetails.vue

@ -2,4 +2,5 @@
NODE_ENV = 'development' NODE_ENV = 'development'
VITE_APP_TITLE = '无糖运营平台' VITE_APP_TITLE = '无糖运营平台'
VITE_APP_BASE_API = 'http://localhost:8080' VITE_APP_BASE_API = 'http://localhost:8080'
# VITE_APP_BASE_API = 'http://10.100.200.177:8080' # VITE_APP_BASE_API = 'http://10.100.200.177:8080'
VITE_HOME_URL = 'http://localhost:8866/portal'

@ -1,3 +1,4 @@
NODE_ENV = 'production' NODE_ENV = 'production'
VITE_APP_TITLE = '无糖运营平台' VITE_APP_TITLE = '无糖运营平台'
# VITE_APP_BASE_API = '/prod-api' # VITE_APP_BASE_API = '/prod-api'
VITE_HOME_URL = 'http://localhost:8866/portal'

@ -15,7 +15,7 @@ let nodeID = 0
// //
const clickGraphChange = async (id: number) => { const clickGraphChange = async (id: number) => {
if (nodeID === id) { 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 { } else {
nodeID = id nodeID = id
} }

Loading…
Cancel
Save