例如获取id为box的元素信息
wx.createSelectorQuery().selectAll('#box').boundingClientRect(function (res) {
console.log(res)//小程序组建中不会返回#box元素的信息
}).exec()
修改为即可
const $ = wx.createSelectorQuery().in(this)
$.selectAll('.scroll-number').boundingClientRect(function (res) {
}).exec()