部分代码抽取(数据处理,排序)优化

This commit is contained in:
zhouyuejun
2018-12-07 11:28:45 +08:00
parent f3ef53ee06
commit 8a8ce8a27c
7 changed files with 636 additions and 627 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ export class WebsocketService {
constructor() { }
dynamicsMessage() {
let url = ("ws://" + window.location.host + "/v2/broker/?topics=topic2");
let url = ("ws://" + window.location.host + "/v2/broker/?topics=schd,msg");
if (window.location.protocol === 'https:' && url.indexOf(INSECURE) === 0) {
url = SECURE + url.substr(INSECURE.length);
@@ -22,7 +22,7 @@ export class WebsocketService {
console.log('websocket was connected...')
}
this.websocket.onmessage = (event) => {
ob.next(event.data)
ob.next(event)
}
this.websocket.onerror = () => {
ob.error("连接失败")