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