1.优化补传错误码处理
This commit is contained in:
parent
fe3e1f71ec
commit
14ef2d650e
1
entry/.gitignore
vendored
1
entry/.gitignore
vendored
@ -4,3 +4,4 @@
|
||||
/.cxx
|
||||
/.idea
|
||||
/oh_modules
|
||||
/src/main/refactor
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user