修改新数据反转

This commit is contained in:
RenCheng 2025-03-01 17:03:57 +08:00
parent a777bea0bc
commit 828b5c6a6d
2 changed files with 6 additions and 6 deletions

View File

@ -71,17 +71,17 @@
this.websock.onclose = this.websocketclose;
},
websocketonopen: function () {
this.contentList.push("消息服务连接成功");
this.contentList.unshift("消息服务连接成功");
},
websocketonerror: function (e) {
this.contentList.push("消息服务连接失败"+JSON.stringify(e));
this.contentList.unshift("消息服务连接失败"+JSON.stringify(e));
},
websocketonmessage: function (e) {
var data = eval("(" + e.data + ")");
console.log(data);
//
if(data.content.length >0){
this.contentList.push(data.content);
this.contentList.unshift(data.content);
}
},
websocketclose: function (e) {

View File

@ -71,17 +71,17 @@
this.websock.onclose = this.websocketclose;
},
websocketonopen: function () {
this.contentList.push("消息服务连接成功");
this.contentList.unshift("消息服务连接成功");
},
websocketonerror: function (e) {
this.contentList.push("消息服务连接失败"+JSON.stringify(e));
this.contentList.unshift("消息服务连接失败"+JSON.stringify(e));
},
websocketonmessage: function (e) {
var data = eval("(" + e.data + ")");
console.log(data);
//
if(data.content.length >0){
this.contentList.push(data.content);
this.contentList.unshift(data.content);
}
if(data.currProgress != null){
this.percent = data.currProgress;