日期更新OCR

This commit is contained in:
bb_pan 2025-09-04 10:49:10 +08:00
parent 4c5810a1a7
commit 9ebcba0036
2 changed files with 10 additions and 12 deletions

View File

@ -264,12 +264,10 @@ const getDeviceInfo = () => {
try {
const systemInfoData = uni.getSystemInfoSync();
console.log('设备信息:', systemInfoData);
systemInfo.value = systemInfoData;
// systemInfo.value = systemInfoData;
//
const screenHeight = systemInfoData.screenHeight;
const screenWidth = systemInfoData.screenWidth;
this.screenHeight = screenHeight;
this.screenWidth = screenWidth;
screenHeight.value = systemInfoData.screenHeight
screenWidth.value = systemInfoData.screenWidth
} catch (error) {
console.error('获取设备信息失败:', error);
}
@ -646,7 +644,7 @@ const takePicture = async () => {
if (!CameraPreview) {
throw new Error('相机插件不可用');
}
CameraPreview.takePicture({width:this.screenWidth, height:this.screenHeight, quality: 50}, async (base64PictureData) => {
CameraPreview.takePicture({width:screenWidth.value, height:screenHeight.value, quality: 50}, async (base64PictureData) => {
console.log('拍照返回数据',base64PictureData);
await processImage(base64PictureData);
});

View File

@ -354,12 +354,12 @@ const getDeviceInfo = () => {
try {
const systemInfoData = uni.getSystemInfoSync();
console.log('设备信息:', systemInfoData);
systemInfo.value = systemInfoData;
// systemInfo.value = systemInfoData;
//
const screenHeight = systemInfoData.screenHeight; // 1000
const screenWidth = systemInfoData.screenWidth; // 600
this.screenHeight = screenHeight;
this.screenWidth = screenWidth;
// const screenHeight = systemInfoData.screenHeight; // 1000
// const screenWidth = systemInfoData.screenWidth; // 600
screenHeight.value = systemInfoData.screenHeight
screenWidth.value = systemInfoData.screenWidth
} catch (error) {
console.error('获取设备信息失败:', error);
}
@ -532,7 +532,7 @@ const takePicture = async () => {
if (!CameraPreview) {
throw new Error('相机插件不可用');
}
CameraPreview.takePicture({width:this.screenWidth, height:this.screenHeight, quality: 50}, async (base64PictureData) => {
CameraPreview.takePicture({width:screenWidth.value, height:screenHeight.value, quality: 50}, async (base64PictureData) => {
console.log('拍照返回数据',base64PictureData);
await processImage(base64PictureData);
});