This commit is contained in:
srcrs 2023-07-28 21:32:12 +08:00
parent 7cd65f70a0
commit 3adf1d04a8

View File

@ -102,7 +102,7 @@
feeds: [],
};
},
async created() {
async mounted() {
const protocol = window.location.protocol === 'https:' ? 'wss://' : 'ws://';
const socket = new WebSocket(protocol + window.location.host + "/ws");
socket.onmessage = event => {