update 修改bug81427;把配置文件单独提出来

This commit is contained in:
赵霄
2024-01-29 14:41:24 +08:00
parent b924a179de
commit 52d3afd690
10 changed files with 32 additions and 18 deletions
+1
View File
@@ -0,0 +1 @@
NODE_ENV=production
+1
View File
@@ -0,0 +1 @@
NODE_ENV=development
+1
View File
@@ -0,0 +1 @@
NODE_ENV=production
+1
View File
@@ -0,0 +1 @@
NODE_ENV=test
+2 -1
View File
@@ -4,7 +4,8 @@
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
"build": "vue-cli-service build",
"build:test": "vue-cli-service build --mode test"
},
"dependencies": {
"ant-design-vue": "^1.7.5",
+5
View File
@@ -0,0 +1,5 @@
window._CONFIG = {}
// 后端地址
window._CONFIG.interfaceUrl = 'http://10.0.1.19:8184'
// 后端地址
window._CONFIG.downloadUrl = 'http://10.0.1.19:8184'
+8 -14
View File
@@ -10,23 +10,17 @@
<script type="text/javascript" src="/v1/plugins-ui.js"></script>
<link rel="stylesheet" href="/v1/plugins.css">
<!-- 全局配置 -->
<!--开发环境-->
<% if (process.env.NODE_ENV === 'development' ) { %>
<script>
window._CONFIG = {
// 'interfaceUrl': 'http://139.9.235.66:8184',
'interfaceUrl': 'http://10.0.1.28:8184',
// 'downloadUrl': 'http://139.9.235.66:8184'
'downloadUrl': 'http://10.0.1.28:8184'
}
</script>
<script src="/dev_api_config.js"></script>
<% } %>
<!--生产环境-->
<% if (process.env.NODE_ENV === 'production' ) { %>
<script>
window._CONFIG = {
'interfaceUrl': 'http://laws.sinotruk.com',
'downloadUrl': 'http://laws-sinotruk-server-kmc2c.yf-grp:8080'
}
</script>
<script src="/prod_api_config.js"></script>
<% } %>
<!--测试环境-->
<% if (process.env.NODE_ENV === 'test' ) { %>
<script src="/test_api_config.js"></script>
<% } %>
</head>
<body>
+5
View File
@@ -0,0 +1,5 @@
window._CONFIG = {}
// 后端地址
window._CONFIG.interfaceUrl = 'http://laws.sinotruk.com'
// 后端地址
window._CONFIG.downloadUrl = 'http://laws-sinotruk-server-kmc2c.yf-grp:8080'
+5
View File
@@ -0,0 +1,5 @@
window._CONFIG = {}
// 后端地址
window._CONFIG.interfaceUrl = 'http://10.10.10.46:9901'
// 后端地址
window._CONFIG.downloadUrl = 'http://10.10.10.46:9901'
+3 -3
View File
@@ -6,10 +6,10 @@
const interfaceUrl = window._CONFIG.interfaceUrl + '/laws-sinotruk/' //本地
// const interfaceUrl = 'https://srms.foton.com.cn/api/' //线上
const uploadFilePath = '/laws-sinotruk/onlyoffice/upload' // 上传文件地址
const downloadFilePath = window._CONFIG.downloadUrl + '/laws-sinotruk/onlyoffice/downLoadFile' // 下载文件地址
const uploadFilePath = '/laws-sinotruk/onlyOffice/upload' // 上传文件地址
const downloadFilePath = window._CONFIG.downloadUrl + '/laws-sinotruk/onlyOffice/downLoadFile' // 下载文件地址
const staticFilePath = window._CONFIG.interfaceUrl + '/laws-sinotruk/onlyoffice/downLoadFile' //本地
const staticFilePath = window._CONFIG.interfaceUrl + '/laws-sinotruk/onlyOffice/downLoadFile' //本地
// const staticFilePath = 'https://srms.foton.com.cn/api/att/attFile/downloadFile' //线上
module.exports = {
interfaceUrl,