|
|
|
@ -32,7 +32,7 @@ export default { |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
initWebSocket(supplierId) { |
|
|
|
initWebSocket(supplierId) { |
|
|
|
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https |
|
|
|
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https |
|
|
|
let wsUrl = `ws://192.168.3.32:81/websocket/${supplierId}`; |
|
|
|
let wsUrl = `ws://171.16.8.51:81/websocket/${supplierId}`//`ws://192.168.3.32:81/websocket/${supplierId}`; |
|
|
|
this.websocket = new WebSocket(wsUrl); |
|
|
|
this.websocket = new WebSocket(wsUrl); |
|
|
|
this.websocket.onopen = this.websocketonopen; |
|
|
|
this.websocket.onopen = this.websocketonopen; |
|
|
|
this.websocket.onerror = this.websocketonerror; |
|
|
|
this.websocket.onerror = this.websocketonerror; |
|
|
|
|