From 1cd5d740eb789fea791ec5c69f98591bcef44dad Mon Sep 17 00:00:00 2001 From: fengchenchen Date: Tue, 12 Oct 2021 09:08:45 +0800 Subject: [PATCH] =?UTF-8?q?[update]-=E9=83=A8=E7=BD=B2=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E9=A1=B9=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintignore | 3 ++- package.json | 2 +- public/development_address_config.js | 14 ++++++++++++++ public/index.html | 8 +++++++- public/production_address_config.js | 15 +++++++++++++++ vue.config.js | 11 +++++++---- 6 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 public/development_address_config.js create mode 100644 public/production_address_config.js diff --git a/.eslintignore b/.eslintignore index 4deb596..080401d 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,5 @@ -/dist +/enterprise /public /vue.config.js /babel.config.js +/*.js diff --git a/package.json b/package.json index 45300f6..0eb8f85 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "dependencies": { "ant-design-vue": "^1.7.6", "axios": "^0.21.1", - "compression-webpack-plugin": "^8.0.1", + "compression-webpack-plugin": "5.0.1", "core-js": "^3.6.5", "dayjs": "^1.10.6", "enquire.js": "^2.1.6", diff --git a/public/development_address_config.js b/public/development_address_config.js new file mode 100644 index 0000000..0d66ffc --- /dev/null +++ b/public/development_address_config.js @@ -0,0 +1,14 @@ +/** + * 防止打包部署时路径被写死-开发环境的配置项 + */ +window._CONFIG = {}; +window._CONFIG["domianURL"] = "/jero-boot"; // 路由转发 devServer +// websocket连接的地址 +window._CONFIG["domianWebSocketURL"] = "http://localhost:21824/jero-boot"; +// 单点登录地址 +window._CONFIG["staticDomainURL"] = window._CONFIG["domianURL"] + "/sys/common/download"; +window._CONFIG["pdfDomainURL"] = window._CONFIG["domianURL"] + "/sys/common/pdf/pdfPreviewIframe"; +window._CONFIG["casPrefixUrl"] = "http://cas.example.org:8443/cas"; +// 预览文件地址 +window._CONFIG["onlinePreviewDomainURL"] = "http://localhost:8012/onlinePreview"; + diff --git a/public/index.html b/public/index.html index 03ee5ff..a506b0c 100644 --- a/public/index.html +++ b/public/index.html @@ -7,7 +7,13 @@ <%= htmlWebpackPlugin.options.title %> - + + <% if (process.env.NODE_ENV === 'development' ) { %> + + <% } %> + <% if (process.env.NODE_ENV === 'production' ) { %> + + <% } %>