Commit e41f8533 authored by 赵啸非's avatar 赵啸非

修改消息组件

parent 2556e888
......@@ -5,5 +5,5 @@ NODE_ENV = 'production'
VUE_APP_BASE_API = http://192.168.0.98:11091/m
# websocket地址
VUE_APP_WEBSOCKET_API =192.168.0.98:11091/ws
VUE_APP_WEBSOCKET_API =192.168.0.98:18222/m
......@@ -32,6 +32,8 @@ const onerrorWS = () => {
Socket.close()
clearInterval(setIntervalWesocketPush)
console.log('连接失败重连中')
setTimeout(() => {
}, 1000)
if (Socket.readyState !== 3) {
Socket = null
createSocket(reUrl)
......@@ -80,6 +82,8 @@ export const sendWSPush = message => {
const oncloseWS = () => {
clearInterval(setIntervalWesocketPush)
console.log('websocket已断开....正在尝试重连')
setTimeout(() => {
}, 1000)
if (Socket.readyState !== 2) {
Socket = null
createSocket(reUrl)
......
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