App.vue 727 B

123456789101112131415161718192021222324252627282930313233343536
  1. <script>
  2. export default {
  3. data() {
  4. return {
  5. // globalData: {},
  6. }
  7. },
  8. onLaunch: function() {
  9. console.log('App Launch')
  10. // uni.getSystemInfo({ //设置屏幕高度
  11. // success: res => {
  12. // //减去tabbar的高度,默认为50px
  13. // this.globalData.screenHeight = res.screenHeight;
  14. // // this.globalData.screenWidth = res.screenWidth;
  15. // }
  16. // })
  17. },
  18. onShow: function() {
  19. console.log('App Show')
  20. },
  21. onHide: function() {
  22. console.log('App Hide')
  23. }
  24. }
  25. </script>
  26. <style lang="scss">
  27. /*每个页面公共css */
  28. @import "@/uni_modules/uview-ui/index.scss";
  29. uni-page-body,html,body{
  30. height: 100%;
  31. width: 750rpx;
  32. background: #F6F6F6;
  33. }
  34. </style>