<script>
import md5Libs from '@/uni_modules/uview-ui/libs/function/md5';
import Vue from 'vue';

export default {
	created() {
		// #ifdef APP-PLUS
		plus.navigator.closeSplashscreen();
		// #endif
	},
	onLaunch: async function () {
		console.log('App Launch');
		uni.hideTabBar();
		//加载配置

		uni.getSystemInfo({
			success: function (e) {
				// #ifndef MP
				Vue.prototype.StatusBar = e.statusBarHeight;
				if (e.platform == 'android') {
					Vue.prototype.CustomBar = e.statusBarHeight + 50;
				} else {
					Vue.prototype.CustomBar = e.statusBarHeight + 45;
				}
				// #endif

				// #ifdef MP-WEIXIN
				Vue.prototype.StatusBar = e.statusBarHeight;
				let custom = wx.getMenuButtonBoundingClientRect();
				Vue.prototype.Custom = custom;
				Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
				// #endif

				// #ifdef MP-ALIPAY
				Vue.prototype.StatusBar = e.statusBarHeight;
				Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
				// #endif
			}
		});

		let res = await this.$api.getConfig();
		// console.log(res);
		if (!res.code) {
			return;
		}
		this.vuex_config = res.data;
	},
	onShow: function () {
		console.log('App 开启');
		uni.hideTabBar();
	},
	onHide: function () {
		console.log('App 关闭');
	},
	onLoad: function () {
		uni.hideTabBar();
	}
};
</script>

<style lang="scss">
@import '@/uni_modules/uview-ui/index.scss';
@import 'common/app.css';
@import './GraceUI5/css/graceUI.css';
@import './GraceUI5/skin/black.css';
/* 加载图标字体 - 条件编译模式 */
/* #ifdef APP-PLUS-NVUE */
.gui-icons {
	font-family: graceIconfont;
}
/* #endif */
</style>
