From 53119e36424b149dbc4318e63ba26f1e5bdcb38f Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期二, 21 一月 2025 10:31:04 +0800 Subject: [PATCH] 调整回原先的读取环境文件配置接口地址 --- src/utils/request.js | 4 ++-- .env.development | 10 +++++----- vue.config.js | 10 ++++------ .env.production | 7 +++++-- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.env.development b/.env.development index 01bc94b..f688f83 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ NODE_ENV=development -VUE_APP_API_BASE_URL=http://127.0.0.1:9999 +# VUE_APP_API_BASE_URL=http://192.168.124.118:3000 +# VUE_APP_API_BASE_URL=http://195.0.1.10:6099 +VUE_APP_API_BASE_URL=http://127.0.0.1:8089 +# VUE_APP_API_BASE_URL=http://195.0.1.10:8099 VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas -VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview - -# 寰簲鐢ㄥ垪琛ㄥ繀椤籚UE_APP_SUB_寮�澶�,jeecg-app-1涓哄瓙搴旂敤鐨勯」鐩悕绉�,涔熸槸瀛愬簲鐢ㄧ殑璺敱鐖惰矾寰� -VUE_APP_SUB_jeecg-app-1 = '//localhost:8092' +VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview \ No newline at end of file diff --git a/.env.production b/.env.production index 530cebc..870a556 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,7 @@ NODE_ENV=production -VUE_APP_API_BASE_URL=http://localhost:8080/jeecg-boot +# VUE_APP_API_BASE_URL=http://195.0.1.10:8099 +# VUE_APP_API_BASE_URL=http://195.0.1.10:6099 +# VUE_APP_API_BASE_URL=http://192.168.124.123:9999 +VUE_APP_API_BASE_URL=http://172.16.99.3:6099 VUE_APP_CAS_BASE_URL=http://localhost:8888/cas -VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview \ No newline at end of file +VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview1p \ No newline at end of file diff --git a/src/utils/request.js b/src/utils/request.js index 2abc6cb..d1a395a 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -15,8 +15,8 @@ //console.log("apiBaseUrl= ",apiBaseUrl) // 鍒涘缓 axios 瀹炰緥 const service = axios.create({ - baseURL: '/api', - // baseURL: apiBaseUrl, // api base_url + // baseURL: '/api', + baseURL: apiBaseUrl, // api base_url timeout: 500000 // 璇锋眰瓒呮椂鏃堕棿 }) diff --git a/vue.config.js b/vue.config.js index a0a2ee1..07c53ce 100644 --- a/vue.config.js +++ b/vue.config.js @@ -87,6 +87,7 @@ devServer: { port: 3000, + open:true, // hot: true, // disableHostCheck: true, // overlay: { @@ -107,13 +108,10 @@ },*/ /* 娉ㄦ剰锛歫eecgboot鍓嶇鍋氫簡鏀归�狅紝姝ゅ涓嶉渶瑕侀厤缃法鍩熷拰鍚庡彴鎺ュ彛锛堝彧闇�瑕佹敼.env鐩稿叧閰嶇疆鏂囦欢鍗冲彲锛� issues/3462 寰堝浜烘澶勫仛浜嗛厤缃紝瀵艰嚧鍒锋柊鍓嶇404闂锛岃涓�瀹氭敞鎰�*/ - '/api': { - target: 'http://127.0.0.1:9998', + '/jeecg-boot': { + target: 'http://localhost:8080', // 璇锋眰鏈湴 闇�瑕乯eecg-boot鍚庡彴椤圭洰 ws: false, - changeOrigin: true, - pathRewrite: { - '^/api': '' - } + changeOrigin: true } } }, -- Gitblit v1.9.3