This commit is contained in:
parent
461bb7fd56
commit
9c7d3da158
|
|
@ -186,7 +186,9 @@ export default {
|
|||
isOverToday: false,
|
||||
isShow: false,
|
||||
message: '',
|
||||
position: 'bottom' // 'top' | 'bottom'
|
||||
position: 'bottom',
|
||||
screenHeight: null,
|
||||
screenWidth: null,
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
|
|
@ -244,6 +246,11 @@ export default {
|
|||
const systemInfo = uni.getSystemInfoSync();
|
||||
console.log('设备信息:', systemInfo);
|
||||
this.systemInfo = systemInfo;
|
||||
// 获取屏幕高度和宽度
|
||||
const screenHeight = systemInfo.screenHeight; // 屏幕高度:1000
|
||||
const screenWidth = systemInfo.screenWidth; // 屏幕宽度:600
|
||||
this.screenHeight = screenHeight;
|
||||
this.screenWidth = screenWidth;
|
||||
} catch (error) {
|
||||
console.error('获取设备信息失败:', error);
|
||||
}
|
||||
|
|
@ -510,7 +517,7 @@ export default {
|
|||
// 拍照前先进行聚焦
|
||||
console.log('拍照前聚焦...');
|
||||
console.log('开始拍照...');
|
||||
CameraPreview.takePicture({width:640, height:540, quality: 50}, async (base64PictureData) => {
|
||||
CameraPreview.takePicture({width:this.screenWidth, height:this.screenHeight, quality: 50}, async (base64PictureData) => {
|
||||
console.log('拍照返回数据',base64PictureData);
|
||||
await this.processImage(base64PictureData);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue