更新多个用户连接同一个设备的通知
This commit is contained in:
@@ -177,6 +177,10 @@ void initEasyDartModule() {
|
||||
WebSocketConfig(ServiceConstant.webSocketService, (data) {
|
||||
// 接收到服务消息
|
||||
var json = jsonDecode(data);
|
||||
ef.log("[websokcet]:${json}");
|
||||
if (json['wsId'] != null) {
|
||||
ef.kvRoot.websocketId = json['wsId'];
|
||||
}
|
||||
if (json['code'] != null && json['code'] != 200) {
|
||||
EasyDartModule.logger.error("websocket连接失败--》" + json);
|
||||
}
|
||||
@@ -184,7 +188,11 @@ void initEasyDartModule() {
|
||||
var call = CommonVariables.callMap[json["path"]];
|
||||
if (call != null) {
|
||||
try {
|
||||
call(json["data"]);
|
||||
if (json['path'] != "/smartbed/connect") {
|
||||
call(json["data"]);
|
||||
} else {
|
||||
call(json);
|
||||
}
|
||||
} catch (e) {
|
||||
print(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user