微信小程序右上角胶囊的信息

右上角胶囊的信息,包含width、height、top等
let rect= wx.getMenuButtonBoundingClientRect();
 
机型信息
let info=wx.getSystemInfoSync();
 
胶囊底部到手机最上面的距离
rect.bottom
 
胶囊三个点到屏幕右边的距离
info.screenWidth-rect.right+ rect.width*3/4+5
原文地址:https://www.cnblogs.com/luoshida/p/13434197.html