<script>
	import Vue from 'vue'
	import {
		mapState,
		mapMutations
	} from 'vuex'
	var that
	export default {
		onLaunch: function() {
			that=this
			console.log('App Launch')
			var token=uni.getStorageSync('token')
			// if(token){
			// 	var identity=uni.getStorageSync('identity')
			// 	if(identity==2){
			// 		uni.reLaunch({
			// 			url:'/pages/tch_index/tch_index'
			// 		})
			// 	}else if(identity==1){
			// 		uni.switchTab({
			// 			url:'/pages/index/index'
			// 		})
			// 	} else {
			// 		uni.reLaunch({
			// 			url:'/pages/admin_index/admin_index'
			// 		})
			// 	}
			// }
			
			uni.getSystemInfo({
				success: function(e) {
					that.$store.commit('setplatform',e.platform)
					// #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
				}
			})
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/* @import "@/uni_modules/uview-ui/index.scss"; */
	@import "./static/iconfont.css";

	/* @font-face {
		font-style: normal;
		font-family: DINCond-Bold;
		src: url("/static/font/DINCond-Bold.otf");
	}

	@font-face {
		font-style: normal;
		font-family: PingFang SC;
		src: url("/static/font/PingFang Medium.ttf");
	} */

	/*每个页面公共css */
	uni-page-body,
	html,
	body {
		margin: 0;
		font-family: PingFang SC, DINCond-Bold, '微软雅黑';
		background-color: #F8F8F8;
		box-sizing: border-box;
	}

	* {
		margin: 0;
		padding: 0;
		box-sizing: border-box;
		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		letter-spacing: 2rpx;
	}

	view,
	text,
	input {
		box-sizing: border-box;
		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
	}

	button {
		margin: 0;
		padding: 0;
	}

	button::after {
		border: none;
		margin: 0;
		padding: 0;
	}

	.flex {
		display: flex;
		display: -webkit-box;
		display: -moz-box;
		display: -webkit-flex;
		display: -moz-flex;
		display: -ms-flexbox;
	}

	.area {
		width: 694rpx !important;
		box-sizing: border-box;
		margin: 0 auto;
	}

	.bottom-of-page {
		position: relative;
		padding-bottom: 160rpx;
		padding-bottom: calc(160rpx + constant(safe-area-inset-bottom));
		padding-bottom: calc(160rpx + env(safe-area-inset-bottom));
	}

	.spot {
		width: 14rpx;
		height: 14rpx;
		background: #2D81FF;
		border-radius: 50%;
	}

	.bottom-button {
		/* 底部按钮 */
		box-shadow: 0rpx 4rpx 21rpx 3rpx rgba(153, 153, 153, 0.12);
		position: fixed;
		bottom: 0;
		left: 0;
		justify-content: center;
		align-items: center;
		padding-bottom: constant(safe-area-inset-bottom);
		padding-bottom: env(safe-area-inset-bottom);
	}

	.uni-input {
		color: #333333;
		font-size: 26rpx;
	}

	.header-wrap {
		/* 头部背景色 */
		width: 100%;
		min-height: 260rpx;
		background: linear-gradient(0deg, #f8f8f8 0%, #ffffff 25%, #5D9DFD 60%, #428EFE 70%, #2D81FF 100%);
		position: relative;
		padding-top: 20rpx;
	}

	.content-wrap {
		position: absolute;
		top: 28rpx;
		left: 50%;
		transform: translate(-50%, 0);
	}

	.text-single {
		/* 单行文本显示省略号*/
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.text-retain {
		/* 多行文本保留两行 */
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}
	*{
		box-sizing:border-box;
	}
	view,text{
		box-sizing:border-box;
		letter-spacing: 0;
	}
	.fwb{
		font-weight: bold;
		font-family: PingFang SC, '微软雅黑';
	}
	/*每个页面公共css */
	.content {
		background: #f8f8f8;
		font-family: "微软雅黑";
	}
		
	.dis_flex {
		/*  #ifndef APP-PLUS-NVUE  */
		display: flex;
		/*  #endif  */
		flex-direction: row;
	}
		
	.dis_flex_c {
		/*  #ifndef APP-PLUS-NVUE  */
		display: flex;
		/*  #endif  */
		flex-direction: column;
	}
		
	.fww {
		flex-wrap: wrap;
	}
		
	.aic {
		align-items: center;
	}
		
	.ais {
		align-items: stretch !important;
	}
		
	.aift {
		align-items: flex-start;
	}
		
	.aife {
		align-items: flex-end;
	}
		
	.ju_a {
		justify-content: space-around;
	}
		
	.ju_b {
		justify-content: space-between;
	}
		
	.ju_c {
		justify-content: center;
	}
		
	.flex_1 {
		flex: 1;
	}
		
	.flex_0 {
		flex: none;
	}
		
	.oh1 {
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box !important;
		-webkit-line-clamp: 1;
		-webkit-box-orient: vertical;
		// text-align: center;
	}
		
	.oh2 {
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		
	}
		
	view {
		word-break: break-all;
		
		word-wrap: break-word;
	}
		
	.oh3 {
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
	}
		
	.oh4 {
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 4;
		-webkit-box-orient: vertical;
	}
	.scroll_x {
		width: 100%;
		white-space: nowrap;
	}
	.textarea-uni{
		font-size: 32rpx;
	}
</style>