let query = wx.createSelectorQuery().in(this);
query.select("#app_calendar").boundingClientRect(function (res) {
console.log("rect2", res)
if (res) {
// that.setData({
// fixedTopHeight: rect.height
// })
console.log(res.height)
}
}).exec();
后面的.in(this)代表在组件中查询,加上就好使了