计算 手机端页面高度和宽度

      init() {
                // 屏幕的高度
                let windowHeight = wx.getSystemInfoSync().windowHeight;
                let windowWidth = wx.getSystemInfoSync().windowWidth // 屏幕的宽度
                let ratio = 750 / windowWidth;
                this.scroll_height = (windowHeight - 50) * ratio;
                console.log(this.scroll_height)
            },
            rightHeightFun() {
                // 屏幕的高度
                let windowHeight = wx.getSystemInfoSync().windowHeight;
                let windowWidth = wx.getSystemInfoSync().windowWidth // 屏幕的宽度
                let ratio = 750 / windowWidth;
                this.rightHeight = (windowHeight - 95) * ratio;
            },
原文地址:https://www.cnblogs.com/Sabo-dudu/p/15142860.html