diff --git a/entry/src/main/cpp/bin/libJudgeSdk.so b/entry/src/main/cpp/bin/libJudgeSdk.so index ddf84372..51a58dd9 100644 Binary files a/entry/src/main/cpp/bin/libJudgeSdk.so and b/entry/src/main/cpp/bin/libJudgeSdk.so differ diff --git a/entry/src/main/ets/api/judge.ts b/entry/src/main/ets/api/judge.ts index 2605219d..2f95d1f3 100644 --- a/entry/src/main/ets/api/judge.ts +++ b/entry/src/main/ets/api/judge.ts @@ -20,7 +20,7 @@ export async function download() { interface WR { message?: string - code?: number + code?: number |string keystr?: string } diff --git a/entry/src/main/ets/pages/Judge.ets b/entry/src/main/ets/pages/Judge.ets index edd0fcd6..6e584f4c 100644 --- a/entry/src/main/ets/pages/Judge.ets +++ b/entry/src/main/ets/pages/Judge.ets @@ -416,10 +416,6 @@ struct Index { let data = decodeURI(systemParm.txt1)?.split("^") allItems = data[0]?.split(",").filter(item => item !== "") || [] } - // 满分学习单独做灯光判断 - if (this.mode === 5) { - this.mockLight = (allItems.length === 0) || allItems.includes(41 + '') - } }) console.log("lixiao mockLight", JSON.stringify(allItems), this.mockLight) systemParms.forEach((systemParm) => { diff --git a/entry/src/main/ets/pages/judgeSDK/judge.ts b/entry/src/main/ets/pages/judgeSDK/judge.ts index 780952f9..c04b5e64 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) => { @@ -605,15 +613,13 @@ export default class Judge { const temp = await writeObjectOut(data, filePath); console.log("wzj", JSON.stringify(temp)) //断网&网络超时次数计算 - if (temp.code != 1) { + if (ifNeedRetry(temp.code)) { this.disConnectNum += 1; if (this.disConnectNum < 5) { return await this.sendWriteObjectOut(data, filePath) } } - if (this.disConnectNum >= 5) { - console.info('surenjun', '123') this.judgeUI.errorMsg = '当前的考试过程信息网络传输异常,程序点击确认将重启!'; this.judgeUI.disConnectErrorOpen = true }