|
|
@ -442,7 +442,7 @@ const setItemsId = (e) => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const locationData = ref({})
|
|
|
|
const locationData = ref({})
|
|
|
|
const processData = (data) => {
|
|
|
|
const processData = (data) => {
|
|
|
|
console.log('data',data)
|
|
|
|
console.log('data',data.ty)
|
|
|
|
if (data.ty === 1) {
|
|
|
|
if (data.ty === 1) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (data.ty === 2) {
|
|
|
|
if (data.ty === 2) {
|
|
|
@ -456,7 +456,7 @@ const processData = (data) => {
|
|
|
|
rotate: data.HeadingAngle
|
|
|
|
rotate: data.HeadingAngle
|
|
|
|
// rotate: 0
|
|
|
|
// rotate: 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
console.log(location)
|
|
|
|
console.log('location',location)
|
|
|
|
locationData.value = location
|
|
|
|
locationData.value = location
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -482,7 +482,6 @@ const ad = () => {
|
|
|
|
|
|
|
|
|
|
|
|
// 3. 接收消息
|
|
|
|
// 3. 接收消息
|
|
|
|
socket.addEventListener("message", (event) => {
|
|
|
|
socket.addEventListener("message", (event) => {
|
|
|
|
console.log('JSON.parse(event.data)',JSON.parse(event.data))
|
|
|
|
|
|
|
|
processData(JSON.parse(event.data))
|
|
|
|
processData(JSON.parse(event.data))
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|