fix websocket连接
This commit is contained in:
parent
9b8f8ecc23
commit
e1fa4f090c
@ -103,7 +103,7 @@
|
||||
};
|
||||
},
|
||||
async created() {
|
||||
const socket = new WebSocket("ws://localhost:8080/ws");
|
||||
const socket = new WebSocket("ws://" + window.location.host + "/ws");
|
||||
socket.onmessage = event => {
|
||||
const feed = JSON.parse(event.data);
|
||||
this.feeds.push(feed);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user