remove ad

This commit is contained in:
liangping 2024-04-20 17:18:58 +08:00
parent 603d7ce227
commit 21feb03ece

View File

@ -10,22 +10,22 @@ const props = defineProps({
});
const show = ref(false)
onMounted(() => {
const adClient = getClient();
const adUnitId = getUnit(props.unit);
show.value = adClient !== undefined && adUnitId !== undefined;
// onMounted(() => {
// const adClient = getClient();
// const adUnitId = getUnit(props.unit);
// show.value = adClient !== undefined && adUnitId !== undefined;
if(show.value) {
adClient.showBannerAd({
adUnitId,
containerId: props.id,
});
}
});
// if(show.value) {
// adClient.showBannerAd({
// adUnitId,
// containerId: props.id,
// });
// }
// });
</script>
<template>
<div v-show="show" class="grid justify-items-center overflow-auto">
<div :id="id" class="mt-6"></div>
</div>
</template>