This commit is contained in:
liaoboping 2025-09-19 21:57:56 +08:00
parent 2931ddbab0
commit 3d07a7ceb5
8 changed files with 25 additions and 2 deletions

View File

@ -3,4 +3,4 @@ VUE_APP_PREVIEW=true
VUE_APP_API_BASE_URL=/api VUE_APP_API_BASE_URL=/api
VUE_APP_API_URL=http://192.168.0.53:8099 VUE_APP_API_URL=http://192.168.0.53:8099
VUE_APP_MAP_BASE_URL=/map VUE_APP_MAP_BASE_URL=/map
VUE_APP_MAP_URL=http://127.0.0.1:8090 VUE_APP_MAP_URL=http://192.168.0.53:8090

View File

@ -1,4 +1,4 @@
NODE_ENV=production NODE_ENV=production
VUE_APP_PREVIEW=true VUE_APP_PREVIEW=true
VUE_APP_API_BASE_URL=/api VUE_APP_API_BASE_URL=/api
VUE_APP_API_URL=http://192.168.0.189:8099 VUE_APP_API_URL=http://192.168.0.53:8099

7
.env.two Normal file
View File

@ -0,0 +1,7 @@
NODE_ENV=two
VUE_APP_PREVIEW=true
VUE_APP_PORT=8002
VUE_APP_API_BASE_URL=/api
VUE_APP_API_URL=http://192.168.0.80:8099
VUE_APP_MAP_BASE_URL=/map
VUE_APP_MAP_URL=http://127.0.0.1:8090

View File

@ -5,6 +5,7 @@
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"serve:8001": "vue-cli-service serve --mode=one", "serve:8001": "vue-cli-service serve --mode=one",
"serve:8002": "vue-cli-service serve --mode=two",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit", "test:unit": "vue-cli-service test:unit",
"lint": "vue-cli-service lint", "lint": "vue-cli-service lint",

11
public/config.two.js vendored Normal file
View File

@ -0,0 +1,11 @@
// @ts-ignore
window._CONFIG = {
ImageryProviderUrl: '/map/mapWX/{z}/{x}/{y}.jpg',
RoadProviderUrl: '',
TerrainProviderUrl: '/map/mapTerrain/',
thirdLoginUrl: 'http://127.0.0.1:8080/thirdLogin',
clientId: '0123456789',
evaluationSrc: 'http://192.168.0.80:8088/thirdLogin/thirdLoginPage?username=admin',
VUE_APP_API_URL: 'http://192.168.0.80:8099',
VUE_APP_WEBSOCKET_URL: 'ws://192.168.0.80:8099',
}

2
public/index.html vendored
View File

@ -21,6 +21,8 @@
<script src="/config.js"></script> <script src="/config.js"></script>
<% if (process.env.NODE_ENV === 'one') { %> <% if (process.env.NODE_ENV === 'one') { %>
<script src="/config.one.js"></script> <script src="/config.one.js"></script>
<% } else if (process.env.NODE_ENV === 'two') { %>
<script src="/config.two.js"></script>
<% } %> <% } %>
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %> <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
<link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" /> <link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />

View File

@ -1,6 +1,7 @@
function initLoadingDom(el, mode = 'light') { function initLoadingDom(el, mode = 'light') {
el.loadingDom = document.createElement('div') el.loadingDom = document.createElement('div')
el.loadingDom.style.position = 'absolute' el.loadingDom.style.position = 'absolute'
el.loadingDom.style.zIndex = 1000
el.loadingDom.style.backgroundColor = { el.loadingDom.style.backgroundColor = {
light: 'rgba(255,255,255,0.3)', light: 'rgba(255,255,255,0.3)',
dark: 'rgba(0,0,0,0.3)', dark: 'rgba(0,0,0,0.3)',

View File

@ -1,3 +1,4 @@
// @ts-nocheck
const os = require('os') const os = require('os')
const path = require('path') const path = require('path')
const webpack = require('webpack') const webpack = require('webpack')