| | |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2025-04-10 12:19:47 |
| | | * @FilePath: \drone-web-manage\src\main.js |
| | | * @Description: |
| | | * |
| | | * Copyright (c) 2025 by shuishen, All Rights Reserved. |
| | | * @Description: |
| | | * |
| | | * Copyright (c) 2025 by shuishen, All Rights Reserved. |
| | | */ |
| | | import { createApp } from 'vue' |
| | | import website from './config/website' |
| | |
| | | import 'animate.css' |
| | | import dayjs from 'dayjs' |
| | | import 'styles/common.scss' |
| | | import * as Cesium from 'cesium' |
| | | |
| | | // 业务组件 |
| | | import tenantPackage from './views/system/tenantpackage.vue' |
| | | // 地图依赖 |
| | |
| | | import * as DC from '@dvgis/dc-sdk' |
| | | import '@dvgis/dc-sdk/dist/dc.min.css' |
| | | window.DC = Object.create(DC) |
| | | import { onResize } from '@/utils/rem' |
| | | onResize() |
| | | const { VITE_APP_BASE,VITE_APP_CESIUM_TOKEN } = import.meta.env |
| | | window.CESIUM_BASE_URL = `${VITE_APP_BASE}/cesiumPu` |
| | | Cesium.Ion.defaultAccessToken = VITE_APP_CESIUM_TOKEN |
| | | |
| | | // 获取url中是否存在token |
| | | const urlParams = getUrlParams(window.location.href) |
| | |
| | | setStore('saber-token', urlParams.token) |
| | | setToken(urlParams.token) |
| | | setRefreshToken(urlParams.token) |
| | | |
| | | const cdxurl = window.location.pathname.replace(/^.*?\/manage\/(.*)$/, '/$1') |
| | | localStorage.setItem('cdx', cdxurl + '?orderNumber=' + urlParams.orderNumber) |
| | | |
| | | // 设置用户信息,把大屏用户信息保存到localStorage |
| | | let obj = {} |
| | | obj = localStorage.getItem("bs_userInfo") |