优化 Websocket 连接

This commit is contained in:
奶爸 committed 2019-12-10 18:05:02 +08:00
1 parent 920737ff0c
commit 6f92e6ea05
5 files changed
+9 -7

No files matched your search

+1 -1
View File
@@ -111,7 +111,7 @@
}
}
})
const ws = new WebSocket('ws://localhost:8080/ws');
const ws = new WebSocket('{{if eq .Domain "localhost"}}ws{{else}}wss{{end}}://{{.Domain}}/ws');
ws.onopen = function (evt) {
$.suiAlert({
title: '实时通道建立',