<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			let version = uni.getSystemInfoSync().uniRuntimeVersion
			function toNum(a){
			    const c = a.toString().split('.');
			    const num_place = ["", "0", "00", "000", "0000"],
			        r = num_place.reverse();
			    for (let i = 0; i < c.length; i++){
			        const len=c[i].length;
			        c[i]=r[len]+c[i];
			    }
			    return c.join('');
			}
			if(toNum(version) < toNum("3.8.0")){
				uni.showModal({
					content: '本示例的HBuilderX版本不得低于3.8.0，请升级',
					showCancel: false
				});
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	/* #ifdef H5 */
	@media screen and (min-width:650px){
		/* pc宽屏 隐藏会话页面头部 && 全局底部导航 以下兼容了Vue2和3两种模式的样式*/
			uni-page[data-page="pages/chat/chat"] uni-page-head,
			{
				display: none !important;
				background-color: red !important;
			}
	}
	/* #endif */
</style>
