<template>
	<view>
		<view class="content">
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				bUnload: false
			}
		},
		onLoad(op) {
			/**
			 * $on 之后要调用 $off,不然会重复绑定
			 */
			uni.$on("game-load", () => {
				uni.$emit("setOnceGameOption", {});
			});
		
			uni.$on("game-unload", (data) => {
				if (!this.bUnload) {
					this.bUnload = true;
					uni.navigateBack({
						delta: 1
					})
				}
			});
	
		},
		onUnload() {
			//subview
			uni.$off("game-load");
			uni.$off("game-unload");
		},
		methods: {
			
		}
	}
</script>

<style>
	.content {
		align-content: center;
		height: 750rpx;
		background-color: #F4F5F6;
	}
</style>
