小程序获取页面宽高

  wx.getSystemInfo({  
            success: (res) => {
              this.setData({
           windowWidth: res.windowWidth * (750 / res.windowWidth),
               windowHeight: (res.windowHeight * (750 / res.windowWidth))
              })
            },
          })
posted @ 2021-12-04 21:59  码渣渣123  阅读(229)  评论(0)    收藏  举报