ocr页面

This commit is contained in:
hayu 2025-08-14 17:51:23 +08:00
parent a11db57ff0
commit 67e91c9ae7
3 changed files with 36 additions and 1 deletions

View File

@ -182,7 +182,6 @@ export default {
}
},
onBackPress(options) {
console.log("进了-----")
//
if (this.showCamera){
console.log('关闭相机...');

View File

@ -138,6 +138,24 @@ export default {
systemInfo: null,
}
},
onBackPress(options) {
//
if (this.showCamera){
console.log('关闭相机...');
try {
this.stopCamera();
} catch (error) {
console.error('关闭相机出错:', error);
} finally {
this.showCamera = false;
this.cameraStarted = false;
this.resetFocusState();
}
return true; //
}
//
return false;
},
onShow() {
this.initializeCordova()
//

View File

@ -144,6 +144,24 @@ export default {
systemInfo: null,
}
},
onBackPress(options) {
//
if (this.showCamera){
console.log('关闭相机...');
try {
this.stopCamera();
} catch (error) {
console.error('关闭相机出错:', error);
} finally {
this.showCamera = false;
this.cameraStarted = false;
this.resetFocusState();
}
return true; //
}
//
return false;
},
onShow() {
this.initializeCordova()
//