diff --git a/DealStrideSolution/entry/src/main/ets/utils/CameraServiceTwo.ets b/DealStrideSolution/entry/src/main/ets/utils/CameraServiceTwo.ets index 1e92ea260692ef0b1a8a9c255b0574281ae2373d..9a69a50386e584c2bfe90f2dd014eced655c5720 100644 --- a/DealStrideSolution/entry/src/main/ets/utils/CameraServiceTwo.ets +++ b/DealStrideSolution/entry/src/main/ets/utils/CameraServiceTwo.ets @@ -179,13 +179,13 @@ class CameraService { } } - getPreviewRotation() { + getPreviewRotation(): void { let previewRotation: camera.ImageRotation | undefined = camera.ImageRotation.ROTATION_0; try { previewRotation = this.previewOutput?.getPreviewRotation(previewRotation); AppStorage.set('previewRotation', previewRotation); } catch (error) { - let err = error as BusinessError; + let err: BusinessError = error as BusinessError; hilog.warn(0x000, 'testTag', `setColorMode failed, code=${err.code}, message=${err.message}`); } }