forked from drone/command-center-dashboard

罗广辉
2025-03-29 e03be13c4a3f5f89487a01b47e0582f617325865
fix: cesium 静态资源路径调整
3 files modified
18 ■■■■ changed files
src/router/page/index.js 5 ●●●●● patch | view | raw | blame | history
src/router/views/index.js 6 ●●●● patch | view | raw | blame | history
src/utils/cesium-tsa.js 7 ●●●● patch | view | raw | blame | history
src/router/page/index.js
@@ -64,4 +64,9 @@
      isAuth: false,
    },
  },
  {
    path: '/',
    name: '主页',
    redirect: '/index',
  },
];
src/router/views/index.js
@@ -5,15 +5,15 @@
  {
    path: '/',
    component: () => import('@/layout/index.vue'),
    redirect: '/home',
    redirect: '/index',
    children: [
      {
        path: 'home',
        path: 'index',
        name: '首页',
        meta: {
          i18n: 'dashboard',
        },
        component: () => import(/* webpackChunkName: "index" */ '@/views/Home/Home.vue'),
        component: () => import(/* webpackChunkName: "home" */ '@/views/Home/Home.vue'),
      },
      {
        path: 'taskManage',
src/utils/cesium-tsa.js
@@ -3,7 +3,12 @@
import store from '@/store';
import { Terrain } from 'cesium';
window.CESIUM_BASE_URL = '/cesiumPu';
// vite env
const { VITE_APP_BASE } = import.meta.env;
window.CESIUM_BASE_URL = `${VITE_APP_BASE}cesiumPu`;
// 定义全局的viewer变量防止重复生成
let viewer = null;
let globalBaseMapLayers = [];