在ipad中,我写入下列代码
App({
onShow() {
wx.getSystemInfo({
success(res) {
console.log(res);
}
});
},
})
|
我通过横屏进入时,打印下列值:
{
SDKVersion:"2.6.4"
albumAuthorized:true
batteryLevel:43
bluetoothEnabled:false
brand:"iPhone"
cameraAuthorized:true
deviceOrientation:"landscape"
errMsg:"getSystemInfo:ok"
fontSizeSetting:17
language:"zh_CN"
locationAuthorized:true
locationEnabled:true
microphoneAuthorized:true
model:"iPad Air 2 (WiFi)<iPad5,3>"
notificationAlertAuthorized:true
notificationAuthorized:true
notificationBadgeAuthorized:true
notificationSoundAuthorized:true
pixelRatio:2
platform:"ios"
screenHeight:768
screenWidth:1024
statusBarHeight:20
system:"iOS 12.1.4"
version:"7.0.3"
wifiEnabled:true
windowHeight:698
windowWidth:1024
}
然后我隐藏,通过竖屏进入时,返回的对象完全相同,也就是说`windowHeight`和`windowWidth`在屏幕方向改变时并不会变化,`deviceOrientation`也是,似乎这些信息在载入小程序后就完全固定了
麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)