日期更新OCR
This commit is contained in:
parent
4c5810a1a7
commit
9ebcba0036
|
|
@ -264,12 +264,10 @@ const getDeviceInfo = () => {
|
||||||
try {
|
try {
|
||||||
const systemInfoData = uni.getSystemInfoSync();
|
const systemInfoData = uni.getSystemInfoSync();
|
||||||
console.log('设备信息:', systemInfoData);
|
console.log('设备信息:', systemInfoData);
|
||||||
systemInfo.value = systemInfoData;
|
// systemInfo.value = systemInfoData;
|
||||||
// 获取屏幕高度和宽度
|
// 获取屏幕高度和宽度
|
||||||
const screenHeight = systemInfoData.screenHeight;
|
screenHeight.value = systemInfoData.screenHeight
|
||||||
const screenWidth = systemInfoData.screenWidth;
|
screenWidth.value = systemInfoData.screenWidth
|
||||||
this.screenHeight = screenHeight;
|
|
||||||
this.screenWidth = screenWidth;
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取设备信息失败:', error);
|
console.error('获取设备信息失败:', error);
|
||||||
}
|
}
|
||||||
|
|
@ -646,7 +644,7 @@ const takePicture = async () => {
|
||||||
if (!CameraPreview) {
|
if (!CameraPreview) {
|
||||||
throw new Error('相机插件不可用');
|
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);
|
console.log('拍照返回数据',base64PictureData);
|
||||||
await processImage(base64PictureData);
|
await processImage(base64PictureData);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -354,12 +354,12 @@ const getDeviceInfo = () => {
|
||||||
try {
|
try {
|
||||||
const systemInfoData = uni.getSystemInfoSync();
|
const systemInfoData = uni.getSystemInfoSync();
|
||||||
console.log('设备信息:', systemInfoData);
|
console.log('设备信息:', systemInfoData);
|
||||||
systemInfo.value = systemInfoData;
|
// systemInfo.value = systemInfoData;
|
||||||
// 获取屏幕高度和宽度
|
// 获取屏幕高度和宽度
|
||||||
const screenHeight = systemInfoData.screenHeight; // 屏幕高度:1000
|
// const screenHeight = systemInfoData.screenHeight; // 屏幕高度:1000
|
||||||
const screenWidth = systemInfoData.screenWidth; // 屏幕宽度:600
|
// const screenWidth = systemInfoData.screenWidth; // 屏幕宽度:600
|
||||||
this.screenHeight = screenHeight;
|
screenHeight.value = systemInfoData.screenHeight
|
||||||
this.screenWidth = screenWidth;
|
screenWidth.value = systemInfoData.screenWidth
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取设备信息失败:', error);
|
console.error('获取设备信息失败:', error);
|
||||||
}
|
}
|
||||||
|
|
@ -532,7 +532,7 @@ const takePicture = async () => {
|
||||||
if (!CameraPreview) {
|
if (!CameraPreview) {
|
||||||
throw new Error('相机插件不可用');
|
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);
|
console.log('拍照返回数据',base64PictureData);
|
||||||
await processImage(base64PictureData);
|
await processImage(base64PictureData);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue