const elequery = wx.createSelectorQuery().in(this);elequery.selectAll('.goods-info').boundingClientRect((res)=>{ console.log(res)}).exec();
goods-info --> 表示类名
res --> 返回数组 数组的长度就是 goods-item 类的个数