This commit is contained in:
huanqing.shao
2019-10-29 13:04:19 +08:00
parent 27618bca57
commit e2b5ddc583
8 changed files with 25 additions and 10 deletions

View File

@ -1,6 +1,6 @@
<template>
<div :style="$isDev ? 'background-color: #grey;' : ''" v-if="!$frontmatter.lessAds && $themeConfig.showAds">
<div class="ads" v-if="!$frontmatter.isSharing">
<div :style="$isDev ? 'background-color: #grey;' : ''">
<div class="ads" v-if="!$frontmatter.lessAds && $themeConfig.showAds && !isSharing">
<div>
<a @click="clickAds" :href="random.url" target="_blank" rel="nofollow" style="text-decoration: none;">
<span class="name">
@ -39,7 +39,15 @@
export default {
data () {
return {
ads: require('./ad-list')
ads: require('./ad-list'),
isSharing: false
}
},
mounted () {
if (typeof window !== 'undefined') {
if (location.search !== undefined && location.search.indexOf('sharing') >= 0) {
this.isSharing = true
}
}
},
computed: {