部分代码抽取(数据处理,排序)优化
This commit is contained in:
@@ -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("连接失败")
|
||||
|
||||
Reference in New Issue
Block a user