<script>
	export default {
		onLaunch() {
			if (window.location.href.slice(window.location.href.indexOf('/', 10) + 1, 9999).length > 5 && window.location
				.href.slice(window.location.href.indexOf('/', 10) + 1, 9999).length < 55) {
				var room_id = window.location.href.slice(window.location.href.indexOf('/', 10) + 1, 9999)
				var reg1 = new RegExp("/", "g")
				room_id = room_id.replace(reg1, "")
				var reg2 = new RegExp("#", "g")
				room_id = room_id.replace(reg2, "")
				uni.setStorageSync('room_id', room_id)
				window.location.replace(window.location.href.slice(0, window.location.href.indexOf('/',10)))

			}
		},
		onShow() {
			console.log('App Show')
		},
		onHide() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	.contents {
		overflow-x: hidden;
	}

	uni-scroll-view .uni-scroll-view::-webkit-scrollbar {
		/* 隐藏滚动条，但依旧具备可以滚动的功能 */
		display: none;
		width: 0 !important;
		height: 0 !important;
		-webkit-appearance: none;
		background: transparent;
		color: transparent;
	}
	/* 弹性盒子 */
	.flex{
		display: flex;
	}
	.flex-col{
		flex-direction: column;
	}
	.j-center{
		justify-content: center;
	}
	.j-between{
		justify-content: space-between;
	}
	.a-center{
		align-items: center;
	}
	.flex-1{
		flex:1;
	}
</style>
