setTimeout(function () {
let query = wx.createSelectorQuery();
query.select('#haha').boundingClientRect()
query.exec(function (res) {
console.log(res[0].height);
that.setData({
changfocus: res[0].height
})
})
}, 200);
<scroll-view scroll-y class='cont-box' scroll-top="{{changfocus}}" bindscrolltoupper="upDatafn">