//创建节点选择器,动态设置scroll-view高度,计算出别的容器的高度 最后减掉就是scroll-view的高度
let that = this;
//search-view高度
// let qSearch = wx.createSelectorQuery();
// qSearch.select(’.successBox’).boundingClientRect()
// qSearch.exec(function (res) {
// that.setData({
// useHeith: that.data.useHeith + res[0].height
// })
// killorder-view高度
let qKillOrder = wx.createSelectorQuery();
qKillOrder.select(’.like’).boundingClientRect()
let result = qKillOrder.exec(function (resk) {
that.setData({
useHeith: that.data.useHeith + resk[0].height
})
wx.getSystemInfo({
success: function (res) {
that.setData({
canUseWidth: res.windowWidth,
canUseHeith: res.windowHeight,
scrollViewHeith: res.windowHeight - that.data.useHeith-2
})
},
})
// })
})
//获取屏幕高度,兼容iphoneX /5
wx.getSystemInfo({
success: function (res) {
console.log(res)
that.setData({
scollHeight: res.safeArea.height - (res.safeArea.height - 860) + (res.model.substring(0, 8) == ‘iPhone X’ ? 10 : 0) - (res.model.substring(0, 8) == ‘iPhone 5’ ? 360 : 0)
});
}
})