1.优化补传错误码处理
This commit is contained in:
		
							parent
							
								
									fe3e1f71ec
								
							
						
					
					
						commit
						14ef2d650e
					
				
							
								
								
									
										3
									
								
								entry/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								entry/.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -3,4 +3,5 @@ | |||||||
| /build | /build | ||||||
| /.cxx | /.cxx | ||||||
| /.idea | /.idea | ||||||
| /oh_modules | /oh_modules | ||||||
|  | /src/main/refactor | ||||||
| @ -58,6 +58,14 @@ import promptAction from '@ohos.promptAction'; | |||||||
| 
 | 
 | ||||||
| const judgeTag = 'SURENJUN_JUDGE' | 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 { | export default class Judge { | ||||||
|   // 过程照片拍照
 |   // 过程照片拍照
 | ||||||
|   getPhoto = async (empty?: boolean) => { |   getPhoto = async (empty?: boolean) => { | ||||||
| @ -695,7 +703,7 @@ export default class Judge { | |||||||
|       console.log("wzj", "第" + this.disConnectNum + "次重新发送", JSON.stringify(data)) |       console.log("wzj", "第" + this.disConnectNum + "次重新发送", JSON.stringify(data)) | ||||||
|     } |     } | ||||||
|     // 不是成功的接口就需要补传
 |     // 不是成功的接口就需要补传
 | ||||||
|     if (temp.code != 1) { |     if (ifNeedRetry(temp.code)) { | ||||||
|       this.disConnectNum += 1; |       this.disConnectNum += 1; | ||||||
|       if (this.disConnectNum < 5) { |       if (this.disConnectNum < 5) { | ||||||
|         if (temp.code == 2300028) { |         if (temp.code == 2300028) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user