小程序
小游戏
企业微信
微信支付
扫描小程序码分享
微信版本8.0.1
基础库版本2.14.4
有2个页面,页面a----windowHeight:812, 页面b-----windowHeight:724
ios真机上获取windowHeight ,
操作步骤:
1.页面a 获取windowHeight为812,
2.跳转页面b 获取windowHeight为724,
3.回到页面a 获取windowHeight为724
开发者工具获取windowHeight一直是正常 正确的值
5 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
以真机为准,开发者工具 只是模拟 只是模拟 只是模拟!
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
这肯定是个bug, 我这边出现三个值,
打开首页时:
screenHeight: 753
screenTop: 82
screenWidth: 384
statusBarHeight: 36
system: "Android 10"
version: "8.0.7"
wifiEnabled: true
windowHeight: 619
windowWidth: 384
加载分包页面时:
screenTop: 0
windowHeight: 753
在页面中component 中获取:
windowHeight: 671
使用的是默认标题栏,而且随便一个空项目就这样必现, 华为Mate 40 Pro. 小米10偶现。其它手机暂未发现
wx.getSystemInfoSync()
分别从不同页面进入同一页面,读取到windowHeight不一致。
android下这bug怎么触发,只能说多找几个型号手机测试才能发现。(绝对是个坑)
改成从app.js onLaunch中读取写到globalData
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
https://developers.weixin.qq.com/community/develop/doc/00062c4b6f887860e04a4400d56c00?_at=1612182229338
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
以真机为准,开发者工具 只是模拟 只是模拟 只是模拟!
这肯定是个bug, 我这边出现三个值,
打开首页时:
screenHeight: 753
screenTop: 82
screenWidth: 384
statusBarHeight: 36
system: "Android 10"
version: "8.0.7"
wifiEnabled: true
windowHeight: 619
windowWidth: 384
加载分包页面时:
screenHeight: 753
screenTop: 0
screenWidth: 384
statusBarHeight: 36
system: "Android 10"
version: "8.0.7"
wifiEnabled: true
windowHeight: 753
windowWidth: 384
在页面中component 中获取:
screenHeight: 753
screenTop: 82
screenWidth: 384
statusBarHeight: 36
system: "Android 10"
version: "8.0.7"
wifiEnabled: true
windowHeight: 671
windowWidth: 384
使用的是默认标题栏,而且随便一个空项目就这样必现, 华为Mate 40 Pro. 小米10偶现。其它手机暂未发现
wx.getSystemInfoSync()
分别从不同页面进入同一页面,读取到windowHeight不一致。
android下这bug怎么触发,只能说多找几个型号手机测试才能发现。(绝对是个坑)
改成从app.js onLaunch中读取写到globalData
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
https://developers.weixin.qq.com/community/develop/doc/00062c4b6f887860e04a4400d56c00?_at=1612182229338