gjy 3 rokov pred
rodič
commit
db2045a2d6
2 zmenil súbory, kde vykonal 25 pridanie a 0 odobranie
  1. 4 0
      .hbuilderx/launch.json
  2. 21 0
      App.vue

+ 4 - 0
.hbuilderx/launch.json

@@ -10,6 +10,10 @@
      	{
      		"launchtype" : "local"
      	},
+     	"h5" : 
+     	{
+     		"launchtype" : "local"
+     	},
      	"type" : "uniCloud"
      }
     ]

+ 21 - 0
App.vue

@@ -32,6 +32,27 @@
 			// },
 		},
 		onLaunch: function() {
+			uni.getSystemInfo({
+			        success:function(e){
+			            Vue.prototype.statusBar = e.statusBarHeight
+			            // #ifndef MP
+			            if(e.platform == 'android') {
+			                Vue.prototype.customBar = e.statusBarHeight + 50
+			            }else {
+			                Vue.prototype.customBar = e.statusBarHeight + 45
+			            }
+			            // #endif
+			            
+			            // #ifdef MP-WEIXIN
+			            let custom = wx.getMenuButtonBoundingClientRect()
+			            Vue.prototype.customBar = custom.bottom + custom.top - e.statusBarHeight
+			            // #endif
+			            
+			            // #ifdef MP-ALIPAY
+			            Vue.prototype.customBar = e.statusBarHeight + e.titleBarHeight
+			            // #endif
+			        }
+			    })
 			// #ifdef APP-PLUS
        // let  isOpenLocation= permision.checkSystemEnableLocation() 
 	   // console.log("isOpenLocation",isOpenLocation)