From c04171420e9522422d110acc165bd8c608c592fb Mon Sep 17 00:00:00 2001 From: kaiyu <404897439@qq.com> Date: Fri, 09 Oct 2020 13:20:41 +0800 Subject: [PATCH] 优化响应速度,取消flag标记以及具体设备的mac。 --- src/main/webapp/view/newmap.jsp | 13 ++++--------- 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/main/webapp/view/newmap.jsp b/src/main/webapp/view/newmap.jsp index c2e63d8..c042725 100644 --- a/src/main/webapp/view/newmap.jsp +++ b/src/main/webapp/view/newmap.jsp @@ -709,11 +709,12 @@ /* if (moralMap.showSensors && typeof (moralMap.showSensors) == "function") { moralMap.showSensors(JSON.parse(JSON.parse(msg.data))); }*/ + if ($("#close").html() == "CloseMq") { + ws.close(); + } + moralMap.showSensors(JSON.parse(JSON.parse(msg.data))); }; - if ($("#close").html()=="CloseMq") { - ws.close(); - } //������������ ws.onclose = function () { $("#close").html("websocket������������"); @@ -722,7 +723,6 @@ ws.onerror = function () { $("#close").html("websocket������������"); }; - } })(jQuery); @@ -839,14 +839,9 @@ } else if ("RefreshState" == methodName) { var states = jsonData.states; moralMap.refreshState(states); - } else if ("DeliverSensors" == methodName) { - $("#close").html(methodName); - moralMap.showSensors(jsonData); } else if ("CloseMq" == methodName) { - //window.location = "http://www.baidu.com" $("#close").html(methodName); } } - </script> -- Gitblit v1.8.0