混凝土运输管理微信小程序、替班
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
881 B

2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
  1. <script>
  2. import plugins from "./plugins/plugins.js"
  3. export default {
  4. onLaunch: function() {
  5. console.log('App Launch')
  6. this.$.appContext.app.use(plugins)
  7. },
  8. onShow: function() {
  9. console.log('App Show')
  10. uni.getSystemInfo({
  11. success: function(res) {
  12. var statusBarHeight = res.statusBarHeight;
  13. var navigationBarHeight = 88;
  14. var safeDistance = statusBarHeight + navigationBarHeight;
  15. console.log('安全距离:' + safeDistance + 'px');
  16. uni.setStorageSync("safeDistance", safeDistance)
  17. // #ifdef H5
  18. document.documentElement.style.setProperty('--safeDistance', safeDistance+"rpx");
  19. // #endif
  20. }
  21. });
  22. },
  23. onHide: function() {
  24. console.log('App Hide')
  25. },
  26. }
  27. </script>
  28. <style>
  29. /*每个页面公共css */
  30. @import url("uni.css");
  31. :root {
  32. --safeDistance: 88rpx;
  33. }
  34. </style>