修复打包的问题
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user