Skip to content

Commit ccbb887

Browse files
committed
docs: update hm
1 parent 805d4e3 commit ccbb887

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

site/components/CarbonAds.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import axios from 'axios';
33
const carbonUrls = {
44
'vuecomponent.github.io': '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vuecomponentgithubio',
55
'tangjinzhou.gitee.io':'//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=tangjinzhougiteeio',
6-
'antdesignvue.gitee.io':'//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=antdesignvuegiteeio',
7-
'vue.ant.design': '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vuecomponentgithubio',
6+
'ant-design-vue.gitee.io':'//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=antdesignvuegiteeio',
7+
'vue.ant.design': '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vueantdesign',
88
};
99
const carbonUrl = carbonUrls[location.host] || '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vuecomponentgithubio';
1010
export default {

site/index.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@
1818
</style>
1919
<script>
2020
var _hmt = _hmt || [];
21-
var isGithub = location.host.indexOf('github') !== -1;
22-
var src = isGithub ? 'https://hm.baidu.com/hm.js?b3ef688fa86bfb75027f1b410180a867' : 'https://hm.baidu.com/hm.js?1564b57c5b8f74933e4fedca9dc75b0d';
21+
var srcMap = {
22+
'vuecomponent.github.io': 'https://hm.baidu.com/hm.js?b3ef688fa86bfb75027f1b410180a867',
23+
'tangjinzhou.gitee.io': 'https://hm.baidu.com/hm.js?1564b57c5b8f74933e4fedca9dc75b0d',
24+
'ant-design-vue.gitee.io': 'https://hm.baidu.com/hm.js?1e30265f06f76fabfcdb7ed272017441',
25+
'vue.ant.design': 'https://hm.baidu.com/hm.js?f0ba868f114e674b816b4880f7525811',
26+
};
27+
var src = srcMap[location.host];
2328
(function() {
2429
var hm = document.createElement('script');
2530
hm.src = src;

0 commit comments

Comments
 (0)