<template>
	<view :style="{display: isShow ? 'block' : 'none'}">
		<ad-custom unit-id="adunit-20d2c6a02e1f544a" :ad-intervals="adIntervals" @error="onerror" @load="onload"></ad-custom>
	</view>
</template>

<script>
	export default {
		name:"ad-custom-view",
		props: {
			// 广告id
			unitId: {
				type: String,
				default: ""
			},
			// 广告自动刷新时间
			adIntervals: {
				type: String,
				default: '100'
			}
		},
		data() {
			return {
				isShow: true
			};
		},
		methods: {
			onload(e) {
				this.isShow = true
			},
			onerror(e) {
				this.isShow = false
			}
		}
	}
</script>

<style>

</style>
