forked from drone/command-center-dashboard

罗广辉
2025-04-02 92d72c59885afa09d16b86e74d927665075ebefc
ci: 添加测试环境
2 files modified
1 files added
24 ■■■■ changed files
.env.test 17 ●●●●● patch | view | raw | blame | history
package.json 3 ●●●● patch | view | raw | blame | history
src/views/Home/useMapAggregation/useMapAggregation.js 4 ●●●● patch | view | raw | blame | history
.env.test
New file
@@ -0,0 +1,17 @@
#开发环境配置
VITE_APP_ENV = 'test'
#接口地址
VITE_APP_API = /api
# VITE_APP_API_URL = https://wrj.shuixiongit.com/api
# 连接本地服务器
VITE_APP_API_URL = http://192.168.1.7
#调试参数
VITE_APP_DEBUG_KEY = saber
VITE_APP_DEBUG_SWITCH = false
#页面基础路径
VITE_APP_BASE = /command-center-dashboard/
package.json
@@ -5,6 +5,7 @@
    "dev": "vite --host",
    "prod": "vite --mode production",
    "build:dev": "vite build --mode development",
    "build:test": "vite build --mode test",
    "build:prod": "vite build --mode production",
    "serve": "vite preview --host",
    "format": "prettier --write \"src/**/*.+(js|ts|jsx|tsx)\""
@@ -53,4 +54,4 @@
    "vite-plugin-svg-icons": "^2.0.1",
    "vite-plugin-vue-setup-extend": "^0.4.0"
  }
}
}
src/views/Home/useMapAggregation/useMapAggregation.js
@@ -127,8 +127,8 @@
  }
  const findFun = (featItem, numItem) => Number(featItem.region_code.slice(0, 6)) === numItem.properties.adcode;
  const { VITE_APP_BASE } = import.meta.env;
  const defaultDir = `${VITE_APP_BASE}public/geoJson/100000/`;
  const { VITE_APP_BASE,VITE_APP_ENV } = import.meta.env;
  const defaultDir =  `${VITE_APP_BASE}${VITE_APP_ENV === 'development' ? 'public' : ''}/geoJson/100000/`;
  const getFiler = async url => {
    const gJson = await import(/* @vite-ignore */ url);