修改新数据反转
This commit is contained in:
parent
a777bea0bc
commit
828b5c6a6d
|
@ -71,17 +71,17 @@
|
||||||
this.websock.onclose = this.websocketclose;
|
this.websock.onclose = this.websocketclose;
|
||||||
},
|
},
|
||||||
websocketonopen: function () {
|
websocketonopen: function () {
|
||||||
this.contentList.push("消息服务连接成功");
|
this.contentList.unshift("消息服务连接成功");
|
||||||
},
|
},
|
||||||
websocketonerror: function (e) {
|
websocketonerror: function (e) {
|
||||||
this.contentList.push("消息服务连接失败"+JSON.stringify(e));
|
this.contentList.unshift("消息服务连接失败"+JSON.stringify(e));
|
||||||
},
|
},
|
||||||
websocketonmessage: function (e) {
|
websocketonmessage: function (e) {
|
||||||
var data = eval("(" + e.data + ")");
|
var data = eval("(" + e.data + ")");
|
||||||
console.log(data);
|
console.log(data);
|
||||||
//处理订阅信息
|
//处理订阅信息
|
||||||
if(data.content.length >0){
|
if(data.content.length >0){
|
||||||
this.contentList.push(data.content);
|
this.contentList.unshift(data.content);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
websocketclose: function (e) {
|
websocketclose: function (e) {
|
||||||
|
|
|
@ -71,17 +71,17 @@
|
||||||
this.websock.onclose = this.websocketclose;
|
this.websock.onclose = this.websocketclose;
|
||||||
},
|
},
|
||||||
websocketonopen: function () {
|
websocketonopen: function () {
|
||||||
this.contentList.push("消息服务连接成功");
|
this.contentList.unshift("消息服务连接成功");
|
||||||
},
|
},
|
||||||
websocketonerror: function (e) {
|
websocketonerror: function (e) {
|
||||||
this.contentList.push("消息服务连接失败"+JSON.stringify(e));
|
this.contentList.unshift("消息服务连接失败"+JSON.stringify(e));
|
||||||
},
|
},
|
||||||
websocketonmessage: function (e) {
|
websocketonmessage: function (e) {
|
||||||
var data = eval("(" + e.data + ")");
|
var data = eval("(" + e.data + ")");
|
||||||
console.log(data);
|
console.log(data);
|
||||||
//处理订阅信息
|
//处理订阅信息
|
||||||
if(data.content.length >0){
|
if(data.content.length >0){
|
||||||
this.contentList.push(data.content);
|
this.contentList.unshift(data.content);
|
||||||
}
|
}
|
||||||
if(data.currProgress != null){
|
if(data.currProgress != null){
|
||||||
this.percent = data.currProgress;
|
this.percent = data.currProgress;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user