Commit c2ba2f8f authored by liujiangnan's avatar liujiangnan

feat: 添加日志

parent de51b171
...@@ -45,12 +45,7 @@ $(function(){ ...@@ -45,12 +45,7 @@ $(function(){
$(".log").html(""); $(".log").html("");
}); });
try { var ws = new WebSocket("ws://localhost:8011/");
} catch (e) {
}
var ws = new WebSocket("ws://localhost:8011");
ws.onmessage = function(e){ ws.onmessage = function(e){
console.log(Date.now(), e.data); console.log(Date.now(), e.data);
// 返回答题结果 // 返回答题结果
...@@ -66,6 +61,7 @@ $(function(){ ...@@ -66,6 +61,7 @@ $(function(){
// const socket = io.connect('http://localhost:8011'); // const socket = io.connect('http://localhost:8011');
// socket.on("clickOption", function(index){ // socket.on("clickOption", function(index){
// $(".log").append(`答题器触发了:${arr[index]} <br>`); // $(".log").append(`答题器触发了:${arr[index]} <br>`);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment