Commit 1f538659 authored by wanli's avatar wanli

feat:

更新WebSocket Host地址
parent d95fcc62
...@@ -2,7 +2,7 @@ import Vue from "vue"; ...@@ -2,7 +2,7 @@ import Vue from "vue";
// import store from "@/store"; // import store from "@/store";
export let wsNotify = new WebSocket( export let wsNotify = new WebSocket(
`ws://localhost:3000/ws/v1/notify` `ws://${window.location.hostname}:3000/ws/v1/notify`
); );
window.wsNotify = wsNotify; window.wsNotify = wsNotify;
...@@ -11,7 +11,7 @@ wsNotify.eventBus = new Vue(); ...@@ -11,7 +11,7 @@ wsNotify.eventBus = new Vue();
wsNotify.eventBus.$on("reconnect", () => { wsNotify.eventBus.$on("reconnect", () => {
wsNotify = new WebSocket( wsNotify = new WebSocket(
`ws://localhost:3000/ws/v1/notify` `ws://${window.location.hostname}:3000/ws/v1/notify`
); );
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment