日期更新OCR
This commit is contained in:
parent
4c5810a1a7
commit
9ebcba0036
|
|
@ -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);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue