From 1bbeba412a6880049ea9a8a649bfa4dbbf29ad44 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Tue, 22 Sep 2020 11:28:08 +0800
Subject: [PATCH] websocket关闭测试
---
src/main/webapp/view/newmap.jsp | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/main/webapp/view/newmap.jsp b/src/main/webapp/view/newmap.jsp
index 395d3fb..d411bc4 100644
--- a/src/main/webapp/view/newmap.jsp
+++ b/src/main/webapp/view/newmap.jsp
@@ -367,7 +367,7 @@
<body>
<div>
</div>
-<%--<textarea id="close" hidden></textarea>--%>
+<textarea id="close" hidden></textarea>
<div class="main_body">
<%--<input id="button" type="button" value="������" onclick="getJs();">--%>
@@ -709,18 +709,18 @@
/* if (moralMap.showSensors && typeof (moralMap.showSensors) == "function") {
moralMap.showSensors(JSON.parse(JSON.parse(msg.data)));
}*/
- /*if ($("#close").html() == "CloseMq") {
+ if ($("#close").html() == "CloseMq") {
ws.close();
- }*/
+ }
};
//������������
ws.onclose = function () {
- //$("#close").html("websocket������������");
+ $("#close").html("websocket������������");
};
//���������������������
ws.onerror = function () {
- //$("#close").html("websocket������������");
+ $("#close").html("websocket������������");
};
}
@@ -842,9 +842,9 @@
} else if ("DeliverSensors" == methodName) {
$("#close").html(methodName);
moralMap.showSensors(jsonData);
- } /*else if ("CloseMq" == methodName) {
+ } else if ("CloseMq" == methodName) {
$("#close").html(methodName);
- }*/
+ }
}
</script>
--
Gitblit v1.8.0