1
This commit is contained in:
@ -14,13 +14,13 @@ VITE_APP_BASE_API_GO = 'http://xny.yj-3d.com:7464'
|
||||
# ws
|
||||
VITE_APP_BASE_WS_API = 'ws://192.168.110.149:8899/resource/websocket'
|
||||
# EARTH
|
||||
VITE_APP_BASE_EARTH_API = "http://192.168.110.2:8895"
|
||||
VITE_APP_BASE_EARTH_API = "http://xny.yj-3d.com:8895"
|
||||
|
||||
# 无人机接口地址
|
||||
VITE_APP_BASE_DRONE_API = 'http://58.17.134.85:9512'
|
||||
|
||||
# 应用访问路径 例如使用前缀 /admin/
|
||||
VITE_APP_CONTEXT_PATH = '/'
|
||||
VITE_APP_CONTEXT_PATH = '/'
|
||||
|
||||
# 监控地址
|
||||
VITE_APP_MONITOR_ADMIN = 'http://localhost:9090/admin/applications'
|
||||
|
||||
@ -17,7 +17,7 @@ VITE_APP_SNAILJOB_ADMIN = '/snail-job'
|
||||
# GO生产环境
|
||||
VITE_APP_BASE_API_GO = 'http://58.17.134.85:7464'
|
||||
VITE_APP_BASE_API = 'http://xny.yj-3d.com:8899'
|
||||
VITE_APP_BASE_EARTH_API = "http://192.168.110.2:8895"
|
||||
VITE_APP_BASE_EARTH_API = "http://xny.yj-3d.com:8895"
|
||||
|
||||
# 是否在打包时开启压缩,支持 gzip 和 brotli
|
||||
VITE_BUILD_COMPRESS = gzip
|
||||
|
||||
@ -15,9 +15,9 @@ const videoDialogRef = ref(null);
|
||||
const token = getToken();
|
||||
const urlParams = new URLSearchParams(new URL(window.location.href).search);
|
||||
const projectIdTwo = urlParams.get('projectId');
|
||||
let ws = new ReconnectingWebSocket(
|
||||
import.meta.env.VITE_APP_BASE_WS_API + '?Authorization=' + token + '&clientid=' + import.meta.env.VITE_APP_CLIENT_ID + '&projectId=' + projectIdTwo
|
||||
);
|
||||
// let ws = new ReconnectingWebSocket(
|
||||
// import.meta.env.VITE_APP_BASE_WS_API + '?Authorization=' + token + '&clientid=' + import.meta.env.VITE_APP_CLIENT_ID + '&projectId=' + projectIdTwo
|
||||
// );
|
||||
// 连接ws
|
||||
const connectWs = () => {
|
||||
ws.onopen = (e) => {
|
||||
@ -139,7 +139,7 @@ function entityClickHandler(entity, item) {
|
||||
}
|
||||
// 初始化地球
|
||||
async function initEarth() {
|
||||
let earth = new YJ.YJEarth('earth');
|
||||
let earth = new YJ.YJEarth('earthqqqq');
|
||||
|
||||
window.Earth1 = earth;
|
||||
// 加载底图
|
||||
@ -166,7 +166,7 @@ async function initEarth() {
|
||||
window.roamingController = roamingController;
|
||||
}
|
||||
async function loadTiltData(item) {
|
||||
let tileset = new YJ.Obj.Tileset(window.Earth1, { id: item.source_id });
|
||||
let tileset = new YJ.Obj.Tileset(window.Earth1, { id: item.source_id, host: import.meta.env.VITE_APP_BASE_EARTH_API });
|
||||
ModelList.set(item.source_id, tileset);
|
||||
await tileset.on();
|
||||
tileset.flyTo();
|
||||
@ -259,7 +259,7 @@ function stopRoaming() {
|
||||
|
||||
onMounted(async () => {
|
||||
// 连接ws
|
||||
connectWs();
|
||||
// connectWs();
|
||||
// 获取选中节点
|
||||
getCheckedNode();
|
||||
// 获取GPS数据
|
||||
@ -268,7 +268,7 @@ onMounted(async () => {
|
||||
await YJ.on({
|
||||
username: 'admin',
|
||||
password: md5('admin_admin123'),
|
||||
host: 'http://192.168.110.2:8895/'
|
||||
host: 'http://xny.yj-3d.com:8895'
|
||||
}).then((res) => {
|
||||
initEarth();
|
||||
modelList.value.forEach((item) => {
|
||||
@ -287,7 +287,7 @@ onUnmounted(() => {
|
||||
</script>
|
||||
<template>
|
||||
<div class="earth-container-big">
|
||||
<div class="earth" id="earth"></div>
|
||||
<div class="earth" id="earthqqqq"></div>
|
||||
<!-- <div v-show="isHide" class="left">
|
||||
<div style="width: 100%;height: 100%;">
|
||||
<el-button type="primary" @click="startRoaming">开始漫游</el-button>
|
||||
|
||||
Reference in New Issue
Block a user