真机 页面配置 landscape 后 getSystemInfo 获取不准?
发布于 6 年前 作者 vdai 2259 次浏览 来自 问答

机型:iphone xsmax、iphone x、华为 P40,开发工具没有问题

微信版本:7.0.17(xsmax)/ 未知 / 7.0.22(P40)

具体复现方式:

  1. A、B、C三个页面,其中B页面配置 pageOrientation: ‘landscape’ 。
  2. 先打开 A 页面,调用 getSystemInfo/getSystemInfoSync 获取到 statusBarHeight:44(ios)/43(P40);
  3. 转跳至 B 页面,调用 getSystemInfo/getSystemInfoSync ,ios 获取到 statusBarHeight:0,P40 获取到 statusBarHeight:43;
  4. 最后转跳至 C 页面,调用 getSystemInfo/getSystemInfoSync ios 获取到 statusBarHeight:0,P40 获取到 statusBarHeight:43;

期望结果:与开发工具表现一致(即三个页面获取分别为 44 -> 0 -> 44)

代码片段:https://developers.weixin.qq.com/s/rAnpqwmB7PnX 开发工具上是正常的,要用真机才有问题

回到顶部