diff --git a/site/components/CarbonAds.vue b/site/components/CarbonAds.vue index 94977df99..679b8e369 100644 --- a/site/components/CarbonAds.vue +++ b/site/components/CarbonAds.vue @@ -2,10 +2,10 @@ import axios from 'axios'; const carbonUrls = { 'www.antdv.com': '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=antdvcom', - 'tangjinzhou.gitee.io': - '//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=tangjinzhougiteeio', - 'ant-design-vue.gitee.io': - '//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=antdesignvuegiteeio', + // 'tangjinzhou.gitee.io': + // '//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=tangjinzhougiteeio', + // 'ant-design-vue.gitee.io': + // '//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=antdesignvuegiteeio', 'vue.ant.design': '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vueantdesign', }; const carbonUrl = diff --git a/site/components/layout.vue b/site/components/layout.vue index 393845e44..4fc69d18a 100644 --- a/site/components/layout.vue +++ b/site/components/layout.vue @@ -28,6 +28,7 @@ const docsList = [ ]; let isMobile = false; +const isGitee = window.location.host.indexOf('gitee.io') > -1; enquireScreen(b => { isMobile = b; }); @@ -74,6 +75,17 @@ export default { } }, mounted() { + if(isGitee) { + this.$info({ + title: '提示', + content: '访问国内镜像站点的用户请访问 antdv.com 站点', + okText:'立即跳转', + onOk() { + location.href = 'https://www.antdv.com'; + }, + }); + } + this.$nextTick(() => { this.addSubMenu(); const nprogressHiddenStyle = document.getElementById('nprogress-style'); @@ -263,7 +275,7 @@ export default { >