@@ -3,11 +3,11 @@ import { enquireScreen } from 'enquire-js';
3
3
import AllDemo from ' ../demo' ;
4
4
import Header from ' ./header' ;
5
5
import Footer from ' ./footer' ;
6
+ import CarbonAds from ' ./CarbonAds' ;
6
7
import Sponsors from ' ./sponsors' ;
7
8
import zhCN from ' antd/locale-provider/zh_CN' ;
8
9
import enUS from ' antd/locale-provider/default' ;
9
10
import sortBy from ' lodash/sortBy' ;
10
- import axios from ' axios' ;
11
11
import { isZhCN } from ' ../util' ;
12
12
import { Provider , create } from ' ../../components/_util/store' ;
13
13
import NProgress from ' nprogress' ;
@@ -156,24 +156,6 @@ export default {
156
156
mountedCallback () {
157
157
NProgress .done ();
158
158
document .documentElement .scrollTop = 0 ;
159
- try {
160
- const isGithub = location .host .indexOf (' github' ) !== - 1 ;
161
- if (isGithub){
162
- document .getElementById (' ad' ).innerHTML = ' ' ;
163
- const src = ' //cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vuecomponentgithubio' ;
164
- const hm = document .createElement (' script' );
165
- hm .src = src;
166
- hm .id = ' _carbonads_js' ;
167
- const s = document .getElementById (' ad' );
168
- s .append (hm);
169
- } else {
170
- axios .get (' https://api.codefund.app/properties/162/funder.html?template=square' )
171
- .then (function (response ) {
172
- document .getElementById (" codefund" ).innerHTML = response .data ;
173
- });
174
- }
175
-
176
- } catch (error) {}
177
159
},
178
160
},
179
161
@@ -320,6 +302,7 @@ export default {
320
302
< / div>
321
303
< / a- locale- provider>
322
304
{ name .indexOf (' back-top' ) === - 1 ? < a- back- top / > : null }
305
+ < CarbonAds / >
323
306
< / div>
324
307
);
325
308
},
0 commit comments