从AGV加载
This commit is contained in:
@@ -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位置失败')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user