Merge branch 'main' of http://47.122.70.237:3000/harmony_car/harmony_vehicle_terminal
This commit is contained in:
		
						commit
						13ff19aefe
					
				| @ -168,7 +168,7 @@ export async function takePhoto( | |||||||
| 
 | 
 | ||||||
|   if (flag === 0) { |   if (flag === 0) { | ||||||
|     return new Promise<takePhotoParam>((resolve, reject) => { |     return new Promise<takePhotoParam>((resolve, reject) => { | ||||||
|       rtsp_server.detectVideoSnapshotSize(video_uri, fileName, (err: BusinessError, snapResult: record.RtspResult) => { |       rtsp_server.detectVideoSnapshotSize(video_uri, fileName, false,(err: BusinessError, snapResult: record.RtspResult) => { | ||||||
|         if (snapResult && snapResult.errorCode === 0) { |         if (snapResult && snapResult.errorCode === 0) { | ||||||
|           const result: takePhotoParam = { |           const result: takePhotoParam = { | ||||||
|             fileSize: snapResult.fileSize, |             fileSize: snapResult.fileSize, | ||||||
| @ -197,21 +197,17 @@ export async function takePhoto( | |||||||
|       const time = GetCurrentTime(); |       const time = GetCurrentTime(); | ||||||
|       const date = time.split(' ')[0]; |       const date = time.split(' ')[0]; | ||||||
|       const dirName = dir || date; |       const dirName = dir || date; | ||||||
| 
 |       rtsp_server.detectVideoSnapshotSize(video_uri, fileName, true,(err: BusinessError, snapResult: record.RtspResult) => { | ||||||
|       rtsp_server.getVideoSnapshot( |  | ||||||
|         context, |  | ||||||
|         video_uri, |  | ||||||
|         fileName, |  | ||||||
|         dirName, |  | ||||||
|         true, |  | ||||||
|         (err: BusinessError, snapResult: record.RtspResult) => { |  | ||||||
|         if (snapResult && snapResult.errorCode === 0) { |         if (snapResult && snapResult.errorCode === 0) { | ||||||
|             resolve({ |           const result: takePhotoParam = { | ||||||
|               base64: snapResult.dataString, |  | ||||||
|               name: snapResult.fileName, |  | ||||||
|             fileSize: snapResult.fileSize, |             fileSize: snapResult.fileSize, | ||||||
|             errorCode: snapResult.errorCode, |             errorCode: snapResult.errorCode, | ||||||
|             }); |             base64: snapResult.dataString, | ||||||
|  |           }; | ||||||
|  |           if (callback) { | ||||||
|  |             callback(result); | ||||||
|  |           } | ||||||
|  |           resolve(result); | ||||||
|         } else { |         } else { | ||||||
|           promptAction.showToast({ |           promptAction.showToast({ | ||||||
|             message: `拍照失败`, |             message: `拍照失败`, | ||||||
| @ -224,8 +220,8 @@ export async function takePhoto( | |||||||
|             errorCode: err ? err.code : -1, |             errorCode: err ? err.code : -1, | ||||||
|           }); |           }); | ||||||
|         } |         } | ||||||
|         } |       }); | ||||||
|       ); | 
 | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user