Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

sysInfoHelper.js 654B

123456789101112131415161718192021222324
  1. let sysInfo = null;
  2. const systemInfo = wx.getSystemInfoSync();
  3. const capsuleInfo = wx.getMenuButtonBoundingClientRect();
  4. // 状态栏高度
  5. sysInfo = {
  6. navBarHeight: capsuleInfo.height + 4 * 2 + systemInfo.statusBarHeight,
  7. statusBarHeight: systemInfo.statusBarHeight * 2,
  8. finalHeight: 92 + systemInfo.statusBarHeight * 2
  9. }
  10. console.log(sysInfo)
  11. console.log('设备高度',systemInfo.statusBarHeight)
  12. console.log('设备高度',systemInfo.windowWidth)
  13. console.log('设备高度',systemInfo.screenHeight)
  14. console.log('设备高度',systemInfo.windowHeight)
  15. console.log('设备高度',systemInfo.pixelRatio)
  16. module.exports = {
  17. sysInfo
  18. }