添加消息输出

This commit is contained in:
RenCheng 2025-03-01 15:22:40 +08:00
parent 8a8055e207
commit aa3bc7d0db
2 changed files with 4 additions and 4 deletions

View File

@ -71,10 +71,10 @@
this.websock.onclose = this.websocketclose;
},
websocketonopen: function () {
console.log("WebSocket连接成功");
this.contentList.push("消息服务连接成功");
},
websocketonerror: function (e) {
console.log("WebSocket连接发生错误");
this.contentList.push("消息服务连接失败"+JSON.stringify(e));
},
websocketonmessage: function (e) {
var data = eval("(" + e.data + ")");

View File

@ -71,10 +71,10 @@
this.websock.onclose = this.websocketclose;
},
websocketonopen: function () {
console.log("WebSocket连接成功");
this.contentList.push("消息服务连接成功");
},
websocketonerror: function (e) {
console.log("WebSocket连接发生错误");
this.contentList.push("消息服务连接失败"+JSON.stringify(e));
},
websocketonmessage: function (e) {
var data = eval("(" + e.data + ")");