From d8e792154c3792b8e9ef2253f2a716f4f7884d61 Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 17 Oct 2022 15:19:16 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E9=97=AE=E9=A2=98=E5=A4=84?= =?UTF-8?q?=E7=90=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- public/home/home.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/home/home.js b/public/home/home.js index c1849b3e3..ca99d45e6 100755 --- a/public/home/home.js +++ b/public/home/home.js @@ -101,11 +101,14 @@ document.onreadystatechange = function () { var data =JSON.parse(e.data) var html = ""; if (data != null){ + console.log("data= " + e.data); + console.log("msg length= " + messageQueue.length); if(messageQueue.length > maxSize){ delete messageQueue[0]; - }else{ - messageQueue.push(data); + console.log("msg length= " + messageQueue.length); } + messageQueue.push(data); + console.log("msg length= " + messageQueue.length); var currentTime = new Date().getTime(); for(var i = 0; i < messageQueue.length; i++){ var record = messageQueue[i];