js:获取系统信息
var that = this;
wx.getSystemInfo({
      success: function (res) {
       that.setData({
          winWidth: res.windowWidth,
          winheight: res.windowHeight
        });
      }
    });
 
css:设置样式:
<view  style="width:{{winWidth}}px;height:{{winheight}}px;">

相关文章: