PRO打包APP商品分类报错TypeError: Cannot read property 'top' of null
找到let query = uni.createSelectorQuery().in(this);
增加个
setTimeout();
for (let i = 0; i < len; i++) {
setTimeout(() => {
//获取元素所在位置
let query = uni.createSelectorQuery().in(this);
let idView = "#b" + i;
query.select(idView).boundingClientRect();
query.exec(function(res) {
let top = res[0].top;
hightArr.push(top);
that.hightArr = hightArr
});
}, 300);
};