Browse Source

首页问题处理。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.10.1^2
zouap 3 years ago
parent
commit
d8e792154c
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      public/home/home.js

+ 5
- 2
public/home/home.js View File

@@ -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];


Loading…
Cancel
Save