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