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) {