From 14ef2d650ea499087acab3c97fe0182861a1af7f Mon Sep 17 00:00:00 2001 From: lixiao <932184220@qq.com> Date: Wed, 21 May 2025 15:27:20 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E8=A1=A5=E4=BC=A0=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=A0=81=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/.gitignore | 3 ++- entry/src/main/ets/pages/judgeSDK/judge.ts | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/entry/.gitignore b/entry/.gitignore index f105b5ae..6e77c3b6 100644 --- a/entry/.gitignore +++ b/entry/.gitignore @@ -3,4 +3,5 @@ /build /.cxx /.idea -/oh_modules \ No newline at end of file +/oh_modules +/src/main/refactor \ No newline at end of file diff --git a/entry/src/main/ets/pages/judgeSDK/judge.ts b/entry/src/main/ets/pages/judgeSDK/judge.ts index 35458cd2..ad37beb2 100644 --- a/entry/src/main/ets/pages/judgeSDK/judge.ts +++ b/entry/src/main/ets/pages/judgeSDK/judge.ts @@ -58,6 +58,14 @@ import promptAction from '@ohos.promptAction'; const judgeTag = 'SURENJUN_JUDGE' +function ifNeedRetry(code: number | string): boolean { + let arr = ["B210010", "B210023", "B210024", "B210031", "B210033", "B210034", "B210041"] + if (!arr.includes(code + "") && code != 1) { + return true + } + return false +} + export default class Judge { // 过程照片拍照 getPhoto = async (empty?: boolean) => { @@ -695,7 +703,7 @@ export default class Judge { console.log("wzj", "第" + this.disConnectNum + "次重新发送", JSON.stringify(data)) } // 不是成功的接口就需要补传 - if (temp.code != 1) { + if (ifNeedRetry(temp.code)) { this.disConnectNum += 1; if (this.disConnectNum < 5) { if (temp.code == 2300028) {