收藏
回答

getSystemInfoAsync在半屏模式返回的windowHeight为什么是全屏时的?

具体机型:iPhone12 pro

微信版本号:8.0.46

系统版本号:IOS 17.0.3

代码片段:

// 通过判断当前windowHeight == screenHeight 给isFullScreen赋状态
onShow: async function (){
 wx.getSystemInfoAsync({
        success: (res) => {
         const { windowHeight, screenHeight } = res;
          if (windowHeight == screenHeight) {
            this.setData({
              isFullScreen: true
            });
          }
        }
      });
  }



最后一次编辑于  01-25
回答关注问题邀请回答
收藏

2 个回答

  • 社区技术运营专员-Jahozheng
    社区技术运营专员-Jahozheng
    01-25

    你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)

    01-25
    有用
    回复
  • KK(version 2.8)
    KK(version 2.8)
    01-25

    补充调用结果图片:

    01-25
    有用
    回复
登录 后发表内容