diff --git a/entry/src/main/ets/common/utils/TcpClient.ts b/entry/src/main/ets/common/utils/TcpClient.ts index 5faa7762..6cff27e4 100644 --- a/entry/src/main/ets/common/utils/TcpClient.ts +++ b/entry/src/main/ets/common/utils/TcpClient.ts @@ -150,11 +150,12 @@ export default class TcpClient { promise.then(() => { reslove(true) }).catch(err => { - - if(!globalThis.getCloseTcp){ + globalThis.tcpSendNum++ + if(!globalThis.getCloseTcp&&globalThis.tcpSendNum>5){ setTimeout(async () => { getTCP(true) }, 3000) + globalThis.tcpSendNum=0 return } globalThis.getCloseTcp=true diff --git a/entry/src/main/ets/entryability/EntryAbility.ts b/entry/src/main/ets/entryability/EntryAbility.ts index 61797483..76776797 100644 --- a/entry/src/main/ets/entryability/EntryAbility.ts +++ b/entry/src/main/ets/entryability/EntryAbility.ts @@ -34,7 +34,7 @@ export default class EntryAbility extends UIAbility { // globalThis.version ='2023.12.13.01'; globalThis.version = GlobalConfig.version.jn.km3[0]; globalThis.judgeVersion = GlobalConfig.version.jn.km3[1]; - + globalThis.tcpSendNum=0 globalThis.videoVersion= '1.0' //视频遮挡 diff --git a/entry/src/main/ets/pages/compontents/judge/DeductionPopup.ets b/entry/src/main/ets/pages/compontents/judge/DeductionPopup.ets index 65a5a8bb..1dd6be67 100644 --- a/entry/src/main/ets/pages/compontents/judge/DeductionPopup.ets +++ b/entry/src/main/ets/pages/compontents/judge/DeductionPopup.ets @@ -46,15 +46,15 @@ export default struct DeductedPopup { } changeCurrentItems(){ - console.info('popup',JSON.stringify(this.currentItems)); - //@ts-ignore - this.universalMarkRules = this.markRules.filter(item => (this.currentItems.includes(item.itemno) || this.currentItems.includes(item.itemno + ''))); - this.currentIndex = this.defaultTabIndex - if(this.currentIndex == 1){ - this.universalMarkRules = this.markRules.filter(item => item.itemno == 20 ) + if(this.currentItems){ + //@ts-ignore + this.universalMarkRules = this.markRules.filter(item => (this.currentItems.includes(item.itemno) || this.currentItems.includes(item.itemno + ''))); + this.currentIndex = this.defaultTabIndex + if(this.currentIndex == 1){ + this.universalMarkRules = this.markRules.filter(item => item.itemno == 20 ) + } } } - //上一页 下一页 goPage(typeIndex){ const currentIndex = this.currentIndex