MUI结合H5+在开发app的过程中如果设置了沉浸式状态栏,在IOS端会使底部导航栏往上移动,这个移动的距离是手机状态栏的高度,在安卓端则无此问题,所以,解决的方法是先判断手机类型,分为安卓手机和苹果手机
if(mui.os.android){
document.getElementById('mainPageFooter').style.top = (plus.display.resolutionHeight - h("#mainPageFooter").height(true)) + "px";
}else{
var StatusbarHeight = plus.navigator.getStatusbarHeight();
document.getElementById('mainPageFooter').style.top = (plus.display.resolutionHeight - h("#mainPageFooter").height(true)+StatusbarHeight) + "px";
}
plus.display.resolutionHeight是H5+里面测出的手机屏幕的高度,设置成固定定位是因为,如果有输入法弹出,底部导航栏会被顶上去