Browse Source

chore: 大屏设计器独立测试环境跟发布环境

master
wangxiang 2 years ago
parent
commit
8f08e21bc9
  1. 4
      cloud/bigscreen-design/.env.development
  2. 4
      cloud/bigscreen-design/.env.production
  3. 11
      cloud/bigscreen-design/.env.test
  4. 1
      cloud/bigscreen-design/package.json
  5. 3
      cloud/bigscreen-design/public/config.js
  6. 2
      cloud/bigscreen-design/src/main.js

4
cloud/bigscreen-design/.env.development

@ -3,7 +3,7 @@
VITE_APP_ENV = 'development' VITE_APP_ENV = 'development'
#接口地址 #接口地址
VITE_APP_API= VITE_APP_API = http://192.168.3.10:9999/system_proxy/bigscreen
#页面基础路径 #页面基础路径
VITE_APP_BASE=/ VITE_APP_BASE = /

4
cloud/bigscreen-design/.env.production

@ -2,10 +2,10 @@
VITE_APP_ENV = 'production' 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 # 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip VITE_BUILD_COMPRESS = gzip

11
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

1
cloud/bigscreen-design/package.json

@ -4,6 +4,7 @@
"scripts": { "scripts": {
"dev:bigscreen": "vite --host", "dev:bigscreen": "vite --host",
"build:bigscreen": "vite build", "build:bigscreen": "vite build",
"build:bigscreen:test": "vite build --mode test",
"serve:bigscreen": "vite preview --host" "serve:bigscreen": "vite preview --host"
}, },
"dependencies": { "dependencies": {

3
cloud/bigscreen-design/public/config.js

@ -4,8 +4,7 @@ window.$website = {
title: '康来生物数据大屏', title: '康来生物数据大屏',
name: '康来生物有限公司 数据大屏', name: '康来生物有限公司 数据大屏',
subName: '可视化数据大屏版权所有 © 长沙康来生物科技有限公司', 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, autoSave: false,
autoSaveTime: 60000, autoSaveTime: 60000,
tabsList: [0, 1, 2, 3, 4, 5, 6], tabsList: [0, 1, 2, 3, 4, 5, 6],

2
cloud/bigscreen-design/src/main.js

@ -23,6 +23,8 @@ createIcon(app);
app.component('avue-draggable', draggable) app.component('avue-draggable', draggable)
app.config.globalProperties.$component = app.component app.config.globalProperties.$component = app.component
app.config.globalProperties.$website = website; app.config.globalProperties.$website = website;
// 根据当前环境设置默认的请求代理路径
window.$website.url = import.meta.env.VITE_APP_API
app.use(DataVVue3) app.use(DataVVue3)
app.use(error); app.use(error);
app.use(router) app.use(router)

Loading…
Cancel
Save