Browse Source

socket断开后,提示重启系统

relver
zhangjiming 7 months ago
parent
commit
c7524f699a
  1. 28
      src/pages/Index/Index.vue

28
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 () => {

Loading…
Cancel
Save