From 87cd27b7980c7c504d829234022412e71c362ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8F=9C?= <43331987+JiaLiBai@users.noreply.github.com> Date: Tue, 11 Nov 2025 17:53:40 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 3 ++- .env.production | 5 +++-- .env.staging | 9 +++------ 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.env.development b/.env.development index 12bd209..d1fa61c 100644 --- a/.env.development +++ b/.env.development @@ -3,6 +3,7 @@ VUE_APP_TITLE = 上动新能源-EMS管理系统 # 开发环境配置 ENV = 'development' +NODE_ENV = development # EMS管理系统/开发环境 VUE_APP_BASE_API = '/dev-api' @@ -11,4 +12,4 @@ VUE_APP_BASE_API = '/dev-api' VUE_CLI_BABEL_TRANSPILE_MODULES = true # EMS管理系统/开发环境 图片拼接地址 -VUE_APP_IMG_URL = '/dev-api' +VUE_APP_IMG_URL = '/dev-api' \ No newline at end of file diff --git a/.env.production b/.env.production index eb5c7ea..949f393 100644 --- a/.env.production +++ b/.env.production @@ -3,9 +3,10 @@ VUE_APP_TITLE = 上动新能源-EMS管理系统 # 生产环境配置 ENV = 'production' +NODE_ENV = production # EMS管理系统/生产环境 VUE_APP_BASE_API = '/dev-api' -# EMS管理系统/生产环境 图片拼接地址 todo baseUrl有变更时 请更新 -VUE_APP_IMG_URL = 'http://110.40.171.179:8089' +# EMS管理系统/生产环境 图片拼接地址 +VUE_APP_IMG_URL = 'http://1.15.120.242:8089 \ No newline at end of file diff --git a/.env.staging b/.env.staging index 31319a8..6bfa0a2 100644 --- a/.env.staging +++ b/.env.staging @@ -1,12 +1,9 @@ # 页面标题 VUE_APP_TITLE = 上动新能源-EMS管理系统 -BABEL_ENV = production - -NODE_ENV = production - # 测试环境配置 ENV = 'staging' +NODE_ENV = staging -# EMS管理系统/测试环境 -VUE_APP_BASE_API = '/stage-api' +# EMS管理系统/生产环境 图片拼接地址 +VUE_APP_IMG_URL = 'http://110.40.171.179:8089' \ No newline at end of file From f24241533bc8e4514c0311926a1ada3901469646 Mon Sep 17 00:00:00 2001 From: dashixiong Date: Wed, 12 Nov 2025 10:50:46 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AB=99=E7=82=B9?= =?UTF-8?q?=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings.js b/src/settings.js index 1be0cc4..c599b8c 100644 --- a/src/settings.js +++ b/src/settings.js @@ -52,5 +52,5 @@ module.exports = { /** * 底部版权文本内容 */ - footerContent: 'Copyright © 2018-2025 xzzn. All Rights Reserved.' + footerContent: 'Copyright © 2025 上动新能源 版权所有' } From bc5f2b4470a30ba7966324a5bc6635f1c1ef2709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8F=9C?= <43331987+JiaLiBai@users.noreply.github.com> Date: Wed, 12 Nov 2025 10:57:07 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 16 ++++++++-------- .env.production | 8 ++++---- .env.staging | 11 +++++++---- vue.config.js | 28 +++++++++++++++++----------- 4 files changed, 36 insertions(+), 27 deletions(-) diff --git a/.env.development b/.env.development index d1fa61c..f6b0e29 100644 --- a/.env.development +++ b/.env.development @@ -1,15 +1,15 @@ # 页面标题 VUE_APP_TITLE = 上动新能源-EMS管理系统 -# 开发环境配置 -ENV = 'development' -NODE_ENV = development - -# EMS管理系统/开发环境 -VUE_APP_BASE_API = '/dev-api' - # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true +# 开发环境配置 +NODE_ENV = 'development' + +# EMS管理系统/开发环境 +VUE_APP_BASE_API = '/dev-api' + # EMS管理系统/开发环境 图片拼接地址 -VUE_APP_IMG_URL = '/dev-api' \ No newline at end of file +VUE_APP_IMG_URL = '/dev-api' + diff --git a/.env.production b/.env.production index 949f393..8539535 100644 --- a/.env.production +++ b/.env.production @@ -2,11 +2,11 @@ VUE_APP_TITLE = 上动新能源-EMS管理系统 # 生产环境配置 -ENV = 'production' -NODE_ENV = production +NODE_ENV = 'production' # EMS管理系统/生产环境 -VUE_APP_BASE_API = '/dev-api' +VUE_APP_BASE_API= 'http://1.15.120.242:8089' # EMS管理系统/生产环境 图片拼接地址 -VUE_APP_IMG_URL = 'http://1.15.120.242:8089 \ No newline at end of file +VUE_APP_IMG_URL = 'http://1.15.120.242:8089' + diff --git a/.env.staging b/.env.staging index 6bfa0a2..90d0468 100644 --- a/.env.staging +++ b/.env.staging @@ -2,8 +2,11 @@ VUE_APP_TITLE = 上动新能源-EMS管理系统 # 测试环境配置 -ENV = 'staging' -NODE_ENV = staging +NODE_ENV = 'staging' + +# EMS管理系统/测试环境 +VUE_APP_BASE_API= 'http://110.40.171.179:8089' + +# EMS管理系统/测试环境 图片拼接地址 +VUE_APP_IMG_URL = 'http://110.40.171.179:8089' -# EMS管理系统/生产环境 图片拼接地址 -VUE_APP_IMG_URL = 'http://110.40.171.179:8089' \ No newline at end of file diff --git a/vue.config.js b/vue.config.js index 9cfe62f..bab4273 100644 --- a/vue.config.js +++ b/vue.config.js @@ -9,8 +9,6 @@ const CompressionPlugin = require('compression-webpack-plugin') const name = process.env.VUE_APP_TITLE || 'EMS管理系统' // 网页标题 -const baseUrl = 'http://110.40.171.179:8089' // 后端接口 - const port = process.env.port || process.env.npm_config_port || 80 // 端口 // vue.config.js 配置说明 @@ -34,19 +32,27 @@ module.exports = { port: port, open: true, proxy: { - // detail: https://cli.vuejs.org/config/#devserver-proxy - [process.env.VUE_APP_BASE_API]: { - target: baseUrl, + // // detail: https://cli.vuejs.org/config/#devserver-proxy + // [process.env.VUE_APP_BASE_API]: { + // target: baseUrl, + // changeOrigin: true, + // pathRewrite: { + // ['^' + process.env.VUE_APP_BASE_API]: '' + // } + // }, + // // springdoc proxy + // '^/v3/api-docs/(.*)': { + // target: baseUrl, + // changeOrigin: true + // } + // 当请求前缀是/dev-api时,使用下面的代理 + '/dev-api': { + target: 'http://110.40.171.179:8089', changeOrigin: true, pathRewrite: { - ['^' + process.env.VUE_APP_BASE_API]: '' + '^/dev-api': '' } }, - // springdoc proxy - '^/v3/api-docs/(.*)': { - target: baseUrl, - changeOrigin: true - } }, disableHostCheck: true },