从AGV加载

This commit is contained in:
ywb
2026-05-25 22:09:08 +08:00
parent 119246ade3
commit df1f8cc319
2 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -285,10 +285,10 @@ createApp({
try {
const res = await fetch(API + '/api/agv/position')
const data = await res.json()
if (data.ok && data.position) {
this.pointEditor.x = data.position.x || 0
this.pointEditor.y = data.position.y || 0
this.pointEditor.yaw = data.position.yaw || 0
if (data.ok && data.position && data.position.length >= 3) {
this.pointEditor.x = data.position[0] || 0
this.pointEditor.y = data.position[1] || 0
this.pointEditor.yaw = data.position[2] || 0
} else {
alert('读取AGV位置失败')
}