diff --git a/project/oms/apps/develop/AppDeployCustom/list.vue b/project/oms/apps/develop/AppDeployCustom/list.vue index fc0d5edb..188a17b5 100644 --- a/project/oms/apps/develop/AppDeployCustom/list.vue +++ b/project/oms/apps/develop/AppDeployCustom/list.vue @@ -145,8 +145,8 @@ export default { }) }, initWs() { - return !this.ws ? new Promise(resolve => { - this.ws = new WebSocket(`ws://localhost:12525/ws`) + return this.ws && this.ws.readyState == 1 ? Promise.resolve() : new Promise(resolve => { + this.ws = new WebSocket(`ws://192.168.1.87:12525/ws`) this.ws.onopen = () => resolve() this.ws.onmessage = res => { if (this.$checkJson(res?.data)) { @@ -173,7 +173,7 @@ export default { this.ws.onerror = () => { this.ws.close() } - }) : Promise.resolve() + }) } }, created() {