<script>
	import plugins from "./plugins/plugins.js"
	
	export default {
		onLaunch: function() {
			console.log('App Launch')
			this.$.appContext.app.use(plugins)
		},
		onShow: function() {
			console.log('App Show')
			uni.getSystemInfo({
			    success: function(res) {
			        var statusBarHeight = res.statusBarHeight;
			        var navigationBarHeight = 88;
			        var safeDistance = statusBarHeight + navigationBarHeight;
			        console.log('安全距离：' + safeDistance + 'px');
				    uni.setStorageSync("safeDistance", safeDistance)
					// #ifdef H5
					document.documentElement.style.setProperty('--safeDistance', safeDistance+"rpx");
					// #endif
			    }
			});
		},
		onHide: function() {
			console.log('App Hide')
		},
	}
</script>

<style>
	/*每个页面公共css */
	@import url("uni.css");
	
	:root {
	  --safeDistance: 88rpx;
	}
</style>
