let rect= wx.getMenuButtonBoundingClientRect() console.log( '胶囊信息声明', rect) this.setData({ tops:rect.top }) 在页面中要用px