diff --git a/cloud/bigscreen-design/.env.development b/cloud/bigscreen-design/.env.development index ccbb813..42be605 100644 --- a/cloud/bigscreen-design/.env.development +++ b/cloud/bigscreen-design/.env.development @@ -3,7 +3,7 @@ VITE_APP_ENV = 'development' #接口地址 -VITE_APP_API= +VITE_APP_API = http://192.168.3.10:9999/system_proxy/bigscreen #页面基础路径 -VITE_APP_BASE=/ \ No newline at end of file +VITE_APP_BASE = / diff --git a/cloud/bigscreen-design/.env.production b/cloud/bigscreen-design/.env.production index 79209f2..e3baf2f 100644 --- a/cloud/bigscreen-design/.env.production +++ b/cloud/bigscreen-design/.env.production @@ -2,10 +2,10 @@ VITE_APP_ENV = 'production' #接口地址 -VITE_APP_API= +VITE_APP_API = https://kicc.kanglailab.com/prod-api/system_proxy/bigscreen #页面基础路径 -VITE_APP_BASE=/bigscreen/ +VITE_APP_BASE = /bigscreen/ # 是否在打包时开启压缩,支持 gzip 和 brotli VITE_BUILD_COMPRESS = gzip diff --git a/cloud/bigscreen-design/.env.test b/cloud/bigscreen-design/.env.test new file mode 100644 index 0000000..f2d49a8 --- /dev/null +++ b/cloud/bigscreen-design/.env.test @@ -0,0 +1,11 @@ +# 生产环境配置 +VITE_APP_ENV = 'production' + +#接口地址 +VITE_APP_API = http://192.168.3.10:9999/system_proxy/bigscreen + +#页面基础路径 +VITE_APP_BASE = / + +# 是否在打包时开启压缩,支持 gzip 和 brotli +VITE_BUILD_COMPRESS = gzip diff --git a/cloud/bigscreen-design/package.json b/cloud/bigscreen-design/package.json index d19df21..c6d1678 100755 --- a/cloud/bigscreen-design/package.json +++ b/cloud/bigscreen-design/package.json @@ -4,6 +4,7 @@ "scripts": { "dev:bigscreen": "vite --host", "build:bigscreen": "vite build", + "build:bigscreen:test": "vite build --mode test", "serve:bigscreen": "vite preview --host" }, "dependencies": { diff --git a/cloud/bigscreen-design/public/config.js b/cloud/bigscreen-design/public/config.js index ae58fd3..5da0670 100644 --- a/cloud/bigscreen-design/public/config.js +++ b/cloud/bigscreen-design/public/config.js @@ -4,8 +4,7 @@ window.$website = { title: '康来生物数据大屏', name: '康来生物有限公司 数据大屏', subName: '可视化数据大屏版权所有 © 长沙康来生物科技有限公司', - url: 'https://192.168.3.10/prod-api/system_proxy/bigscreen', - //url: 'https://kicc.kanglailab.com/prod-api/system_proxy/bigscreen', + url: 'https://kicc.kanglailab.com/prod-api/system_proxy/bigscreen', autoSave: false, autoSaveTime: 60000, tabsList: [0, 1, 2, 3, 4, 5, 6], diff --git a/cloud/bigscreen-design/src/main.js b/cloud/bigscreen-design/src/main.js index c5ae755..5309506 100755 --- a/cloud/bigscreen-design/src/main.js +++ b/cloud/bigscreen-design/src/main.js @@ -23,6 +23,8 @@ createIcon(app); app.component('avue-draggable', draggable) app.config.globalProperties.$component = app.component app.config.globalProperties.$website = website; +// 根据当前环境设置默认的请求代理路径 +window.$website.url = import.meta.env.VITE_APP_API app.use(DataVVue3) app.use(error); app.use(router)