fix websocket连接

This commit is contained in:
srcrs 2023-07-28 02:28:44 +08:00
parent 9b8f8ecc23
commit e1fa4f090c

View File

@ -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);