和算法测试成功第一步 状态界面看到经纬度信息和保存可以成功

This commit is contained in:
mmc
2026-08-19 17:00:07 +08:00
parent 5073f64240
commit be8576b887
9 changed files with 237 additions and 180 deletions

View File

@@ -27,11 +27,14 @@ export default class DeviceController {
this.wsStatus = 'disconnected';
this.wsDeviceInfo = {};
this.locationInfo = {};
this.controlTimeout = null;
this.keepAliveInterval = null; // 后台保活定时器
this.onDeviceInfoUpdate = null;
this.onLocationInfoUpdate = null;
this.onControlStatusChange = null;
this.onWsStatusChange = null;
this.onHasControlRightChange = null;
@@ -156,6 +159,7 @@ export default class DeviceController {
this.connectedDeviceSn = null;
this.wsDeviceInfo = {};
this.locationInfo = {};
this.isControlled = false;
this.onControlStatusChange?.(false);
@@ -263,6 +267,15 @@ export default class DeviceController {
this.onDeviceInfoUpdate?.(data);
break;
}
case 'locationInfo': {
const data = {};
msg.data.forEach((item) => {
data[item.name] = item.value;
});
this.locationInfo = data;
this.onLocationInfoUpdate?.(data);
break;
}
case 'AUTH': {
if (msg.isAuth) {