diff --git a/src/pages/Index/Index.vue b/src/pages/Index/Index.vue index 67daf05..b9cd1ba 100644 --- a/src/pages/Index/Index.vue +++ b/src/pages/Index/Index.vue @@ -417,23 +417,24 @@ const onConfirmReport = async () => { const handleSocketClose = (num: number) => { if (num === 0) { - // 提示用户,连接断开,正尝试重新连接 + // socket连接断开 deviceWaitingModelInfo.value = { - title: '连接断开,正在尝试重新连接', - message: '请不要有任何手动操作!', + title: '系统产生错误,请重启系统', + message: '请尽快重启系统', } showDeviceWaitingModal.value = true - } else if (num === 5) { - // 重试达到最大次数,重试,取消。 - failMessage.value = { - title: '恢复连接失败', - message: '未能恢复连接,建议重启设备', - } - showFailModal.value = true } else if (num === -1) { // 从断开 到 恢复连接, 关闭弹框 showDeviceWaitingModal.value = false } + // else if (num === 5) { + // // 重试达到最大次数,重试,取消。 + // failMessage.value = { + // title: '恢复连接失败', + // message: '未能恢复连接,建议重启设备', + // } + // showFailModal.value = true + // } } // 处理应用事件消息 @@ -467,12 +468,7 @@ const onLogout = () => { const confirmFail = async () => { showFailModal.value = false - if (failMessage.value.title.match('连接失败')) { - wsEvent.connect() - wsState.connect() - } else { - await startInit() - } + await startInit() } //确认错误事件 const confirmError = async () => {