和算法测试成功第一步 状态界面看到经纬度信息和保存可以成功
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user