From 828dce445e17778a06975d02077eaf1160453692 Mon Sep 17 00:00:00 2001 From: surenjun Date: Fri, 18 Apr 2025 17:02:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=201.=E7=9B=91=E7=AE=A1code=E6=B7=BB?= =?UTF-8?q?=E5=8A=A00=E3=80=81-1=E8=A1=A5=E4=BC=A0;=202.carinfo=E8=A1=A8?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0X=5FMCH=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/Judge.ets | 1 + entry/src/main/ets/pages/judgeSDK/judge.ts | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/entry/src/main/ets/pages/Judge.ets b/entry/src/main/ets/pages/Judge.ets index c4fd91cf..b4bd7441 100644 --- a/entry/src/main/ets/pages/Judge.ets +++ b/entry/src/main/ets/pages/Judge.ets @@ -111,6 +111,7 @@ struct Index { FLAG: carInfo.flag, BK1: carInfo.bk1, BK2: carInfo.bk2, + X_MCH:carInfo.x_mch, }) console.info('surenjun =>carinfoArrr',JSON.stringify( this.carinfoArr)) } diff --git a/entry/src/main/ets/pages/judgeSDK/judge.ts b/entry/src/main/ets/pages/judgeSDK/judge.ts index 364d4f0c..62272687 100644 --- a/entry/src/main/ets/pages/judgeSDK/judge.ts +++ b/entry/src/main/ets/pages/judgeSDK/judge.ts @@ -696,13 +696,13 @@ export default class Judge { if (this.disConnectNum < 5 && this.disConnectNum > 0) { console.log("wzj", "第" + this.disConnectNum + "次重新发送", JSON.stringify(data)) } - //断网&网络超时次数计算 - if (temp.code == 2300007 || temp.code == 2300028) { + if ( + //后台连接中心异常 + temp.code == -1 || temp.code == 0 || + //断网&网络超时次数计算 + temp.code == 2300007 || temp.code == 2300028) { this.disConnectNum += 1; if (this.disConnectNum < 5) { - if (temp.code == 2300028) { - await new Promise(resolve => setTimeout(resolve, 1000)); // 延迟1秒 - } return await this.sendWriteObjectOut(data, filePath) } }