ocr页面
This commit is contained in:
parent
a11db57ff0
commit
67e91c9ae7
|
|
@ -182,7 +182,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onBackPress(options) {
|
onBackPress(options) {
|
||||||
console.log("进了-----")
|
|
||||||
// 相机打开时处理返回事件
|
// 相机打开时处理返回事件
|
||||||
if (this.showCamera){
|
if (this.showCamera){
|
||||||
console.log('关闭相机...');
|
console.log('关闭相机...');
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,24 @@ export default {
|
||||||
systemInfo: null,
|
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() {
|
onShow() {
|
||||||
this.initializeCordova()
|
this.initializeCordova()
|
||||||
// 获取设备信息用于相机配置
|
// 获取设备信息用于相机配置
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,24 @@ export default {
|
||||||
systemInfo: null,
|
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() {
|
onShow() {
|
||||||
this.initializeCordova()
|
this.initializeCordova()
|
||||||
// 获取设备信息用于相机配置
|
// 获取设备信息用于相机配置
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue