App.vue 812 字节
Newer Older
DCloud_JSON's avatar
DCloud_JSON 已提交
1 2 3
<script>
	export default {
		onLaunch: function() {
DCloud_JSON's avatar
DCloud_JSON 已提交
4
			console.log('App Launch')
5 6
			
			if(typeof(uniCloud.SSEChannel) == 'undefined' ){
DCloud_JSON's avatar
DCloud_JSON 已提交
7
				uni.showModal({
8
					content: '本项目,仅支持HBuilderX 正式版 v3.7.10 或 alpha v3.8.0及以上版本请升级',
DCloud_JSON's avatar
DCloud_JSON 已提交
9 10
					showCancel: false
				});
11
			}
DCloud_JSON's avatar
DCloud_JSON 已提交
12 13 14 15 16 17 18 19 20 21
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

DCloud_JSON's avatar
DCloud_JSON 已提交
22 23 24 25 26 27 28 29 30 31 32
<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;
			}
	}
DCloud_JSON's avatar
DCloud_JSON 已提交
33
	/* #endif */
DCloud_JSON's avatar
DCloud_JSON 已提交
34
</style>