@@ -3,11 +3,11 @@ import { enquireScreen } from 'enquire-js';
33import AllDemo from ' ../demo' ;
44import Header from ' ./header' ;
55import Footer from ' ./footer' ;
6+ import CarbonAds from ' ./CarbonAds' ;
67import Sponsors from ' ./sponsors' ;
78import zhCN from ' antd/locale-provider/zh_CN' ;
89import enUS from ' antd/locale-provider/default' ;
910import sortBy from ' lodash/sortBy' ;
10- import axios from ' axios' ;
1111import { isZhCN } from ' ../util' ;
1212import { Provider , create } from ' ../../components/_util/store' ;
1313import NProgress from ' nprogress' ;
@@ -156,24 +156,6 @@ export default {
156156 mountedCallback () {
157157 NProgress .done ();
158158 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) {}
177159 },
178160 },
179161
@@ -320,6 +302,7 @@ export default {
320302 < / div>
321303 < / a- locale- provider>
322304 { name .indexOf (' back-top' ) === - 1 ? < a- back- top / > : null }
305+ < CarbonAds / >
323306 < / div>
324307 );
325308 },
0 commit comments