12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <script>
- export default {
- globalData: {
- statusBarHeight: 0,
- navHeight: 0,
- navigationBarHeight: 0,
- },
- onLaunch: function() {
-
-
- this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
-
-
-
- const custom = wx.getMenuButtonBoundingClientRect()
-
-
-
- this.globalData.navigationBarHeight = custom.height + (custom.top - this.globalData.statusBarHeight) * 2
-
-
-
- this.globalData.navHeight = this.globalData.navigationBarHeight + this.globalData.statusBarHeight
-
-
-
-
- this.$wxApi.config()
- },
- onShow: function() {
-
- },
- onHide: function() {
-
- }
- }
- </script>
- <style lang="scss">
-
- @import "@/uni_modules/uview-ui/index.scss";
- @import "@/static/css/common.scss";
- </style>
|