冷不过人心

导航

 

 

wxml:

     <video autoplay src="{{videoPlayUrl}}" controls></video>

    <scroll-view scroll-y style="height: {{height?height+'px':'auto'}}"> 

         <view class='wwww' id='www'>  

              <view>111</view>                      

               <view>111</view> 

            <view>111</view> 

             <view>111</view>  

               <view>111</view>  

            <view>111</view> 

</view>

</scroll-view>

 

css:

       .wwww view{   height: 200rpx;

                                background: wheat }

 

js:

var is_1_height;

Page({  

//生命周期函数--监听页面加载

  onLoad: function(options) { 

        var that=this;   

        wx.getSystemInfo({   

           success: function (res) { 

                      wx.createSelectorQuery().select('video').boundingClientRect(function (rect) {   

                             var is_1_height = Number(rect.height) // 节点的宽度    

                               that.setData({       

                                      height: Number(res.windowHeight) - is_1_height     

                                   });    

                        }).exec();    

                 }   

           });

  }})

 

posted on 2018-11-10 16:11  冷不过人心  阅读(1132)  评论(0)    收藏  举报