Skip to content

Commit b3a0263

Browse files
committed
doc: add ad
1 parent 21fd0c7 commit b3a0263

File tree

3 files changed

+36
-21
lines changed

3 files changed

+36
-21
lines changed

site/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
gtag('config', 'UA-151755889-1');
6060
</script>
6161
<!-- Hotjar Tracking Code for http://vue.ant.design -->
62-
<script>
62+
<!-- <script>
6363
(function (h, o, t, j, a, r) {
6464
if (location.href.indexOf('iframe') === -1) {
6565
h.hj =
@@ -78,6 +78,7 @@
7878
a.appendChild(r);
7979
}
8080
})(window, document, 'https://static.hotjar.com/c/hotjar-', '.js?sv=');
81-
</script>
81+
</script> -->
82+
<script type="text/javascript" src="https://cdn.wwads.cn/js/makemoney.js" async></script>
8283
</body>
8384
</html>

site/src/components/rice/WWAds.vue

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,39 @@
11
<template>
2-
<div>
3-
<div ref="inner" class="wwads-cn wwads-horizontal" data-id="62" style="max-width: 350px"></div>
2+
<div id="rice">
3+
<div class="wwads-cn wwads-vertical" data-id="62" style="max-width: 200px"></div>
44
</div>
55
</template>
66
<script>
77
import { defineComponent } from 'vue';
88
99
export default defineComponent({
10-
mounted() {
11-
this.load();
12-
},
13-
methods: {
14-
load() {
15-
if (this.scriptDom) {
16-
this.$el.removeChild(this.scriptDom);
17-
}
18-
this.$refs.inner.innerHTML = '';
19-
const e = document.createElement('script');
20-
e.src = 'https://wwads.cn/js/makemoney.js';
21-
e.async = true;
22-
this.$el.appendChild(e);
23-
this.scriptDom = e;
24-
},
25-
},
10+
// mounted() {
11+
// // this.load();
12+
// },
13+
// methods: {
14+
// load() {
15+
// if (this.scriptDom) {
16+
// this.$el.removeChild(this.scriptDom);
17+
// }
18+
// this.$refs.inner.innerHTML = '';
19+
// const e = document.createElement('script');
20+
// e.src = 'https://wwads.cn/js/makemoney.js';
21+
// e.async = true;
22+
// this.$el.appendChild(e);
23+
// this.scriptDom = e;
24+
// },
25+
// },
2626
});
2727
</script>
28+
<style scoped>
29+
#rice {
30+
width: 125px;
31+
position: fixed;
32+
z-index: 19;
33+
bottom: 10px;
34+
right: 10px;
35+
padding: 10px;
36+
border-radius: 3px;
37+
font-size: 13px;
38+
}
39+
</style>

site/src/layouts/index.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<Footer />
7474
</a-col>
7575
</a-row>
76-
<RightBottomAd :is-c-n="isZhCN" :is-mobile="isMobile" />
76+
<WWAdsVue v-if="isZhCN && !isMobile" />
7777
</div>
7878
</template>
7979
<script lang="ts">
@@ -93,6 +93,7 @@ import RightBottomAd from '../components/rice/right_bottom_rice.vue';
9393
import { CloseOutlined, MenuOutlined } from '@ant-design/icons-vue';
9494
import ThemeIcon from './ThemeIcon.vue';
9595
import surelyVueVue from '../components/surelyVue.vue';
96+
import WWAdsVue from '../components/rice/WWAds.vue';
9697
9798
const rControl = /[\u0000-\u001f]/g;
9899
const rSpecial = /[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'<>,.?/]+/g;
@@ -112,6 +113,7 @@ export default defineComponent({
112113
MenuOutlined,
113114
ThemeIcon,
114115
surelyVueVue,
116+
WWAdsVue,
115117
},
116118
setup() {
117119
const visible = ref(false);

0 commit comments

Comments
 (0)