From ac20c2155a4bc2d04cdfb16853a7cc24b7c0d6a5 Mon Sep 17 00:00:00 2001 From: lixiao <932184220@qq.com> Date: Mon, 19 May 2025 16:41:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E4=BC=A0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/judgeSDK/judge.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/entry/src/main/ets/pages/judgeSDK/judge.ts b/entry/src/main/ets/pages/judgeSDK/judge.ts index 0b8b5f63..0c931388 100644 --- a/entry/src/main/ets/pages/judgeSDK/judge.ts +++ b/entry/src/main/ets/pages/judgeSDK/judge.ts @@ -694,15 +694,12 @@ export default class Judge { if (this.disConnectNum < 5 && this.disConnectNum > 0) { console.log("wzj", "第" + this.disConnectNum + "次重新发送", JSON.stringify(data)) } - if ( - //后台连接中心异常 - temp.code == -1 || temp.code == 0 || - //断网&网络超时次数计算 - temp.code == 2300007 || temp.code == 2300028) { + // 不是成功的接口就需要补传 + if (temp.code != 1) { this.disConnectNum += 1; if (this.disConnectNum < 5) { if (temp.code == 2300028) { - await new Promise(resolve => setTimeout(resolve, 1000)); // 延迟1秒 + await new Promise(resolve => setTimeout(resolve, 2000)); // 延迟1秒 } return await this.sendWriteObjectOut(data, filePath) }