doc: add google ad

pull/5966/head
tangjinzhou 2 years ago
parent 07907ca7f3
commit 6cd099d691

@ -10,10 +10,10 @@
</a-carousel> </a-carousel>
</template> </template>
<template v-else-if="showGoogleAd"> <template v-else-if="showGoogleAd">
<template v-if="isCN"> <!-- <template v-if="isCN">
<WWAds :key="`WWAds_${$route.path}`" /> <WWAds :key="`WWAds_${$route.path}`" />
</template> </template> -->
<google-ads-top v-else :key="`GoogleAdsTop_${$route.path}`" /> <google-ads-top :key="`GoogleAdsTop_${$route.path}`" />
</template> </template>
</div> </div>
</template> </template>
@ -23,19 +23,19 @@ import dayjs from 'dayjs';
import isBetween from 'dayjs/plugin/isBetween'; import isBetween from 'dayjs/plugin/isBetween';
dayjs.extend(isBetween); dayjs.extend(isBetween);
import GoogleAdsTop from './GoogleAdsTop.vue'; import GoogleAdsTop from './GoogleAdsTop.vue';
import WWAds from './WWAds.vue'; // import WWAds from './WWAds.vue';
const isEffective = (start, end) => { const isEffective = (start, end) => {
return dayjs().isBetween(start, end); return dayjs().isBetween(start, end);
}; };
export default { export default {
components: { components: {
GoogleAdsTop, GoogleAdsTop,
WWAds, // WWAds,
}, },
props: ['isCN', 'isMobile'], props: ['isCN', 'isMobile'],
data() { data() {
return { return {
show: false, show: true,
showGoogleAd: location.host.indexOf('antdv.com') > -1, showGoogleAd: location.host.indexOf('antdv.com') > -1,
cnAds: [ cnAds: [
{ {

@ -37,8 +37,8 @@
</template> </template>
<a-col :xxxl="20" :xxl="20" :xl="19" :lg="18" :md="18" :sm="24" :xs="24"> <a-col :xxxl="20" :xxl="20" :xl="19" :lg="18" :md="18" :sm="24" :xs="24">
<section :class="mainContainerClass"> <section :class="mainContainerClass">
<!-- <TopAd :is-c-n="isZhCN" /> -->
<WWAdsVue v-if="isZhCN" /> <WWAdsVue v-if="isZhCN" />
<TopAd v-else />
<Demo v-if="isDemo" :page-data="pageData" :is-zh-c-n="isZhCN"> <Demo v-if="isDemo" :page-data="pageData" :is-zh-c-n="isZhCN">
<component :is="matchCom" /> <component :is="matchCom" />
</Demo> </Demo>

Loading…
Cancel
Save