fix: Ws重载次数 5

This commit is contained in:
yanghang
2025-07-23 16:01:39 +08:00
parent d55c2f9efc
commit ae7f52f20e
+6
View File
@@ -169,6 +169,7 @@
const talkingList = ref([])
const showModelComfirm = ref(false)
const reconcatNum = ref(1)
const initsocketTask = () => {
socketStore.creatSocket('/traask/asksocket/open?summary=')
// unref(SocketObj).on('open', (res)=>{
@@ -185,8 +186,13 @@
// })
unref(SocketObj).on('error', () => {
if ((watchFlag.value === 1) || showModelComfirm.value) return
if (reconcatNum.value === 5) {
common.msg('系统网络异常,请稍后再试!')
return
}
showModelComfirm.value = true
common.show('提示信息', '网络环境不稳定,请重试!', false, '', '确认').then((res) => {
reconcatNum.value += 1
common.redirectTo(`/pages/index/dialog`)
}).finally(() => {
showModelComfirm.value = false