获取微信小程序元素高度 let query = wx.createSelectorQuery(); query.select('#backgroundImg').boundingClientRect(rect => { let listXxkHeight = rect.height; }).exec();