Skip to content

Commit

Permalink
docs: update hm
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Feb 16, 2019
1 parent 805d4e3 commit ccbb887
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions site/components/CarbonAds.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import axios from 'axios';
const carbonUrls = {
'vuecomponent.github.io': '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vuecomponentgithubio',
'tangjinzhou.gitee.io':'//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=tangjinzhougiteeio',
'antdesignvue.gitee.io':'//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=antdesignvuegiteeio',
'vue.ant.design': '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vuecomponentgithubio',
'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 = carbonUrls[location.host] || '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vuecomponentgithubio';
export default {
Expand Down
9 changes: 7 additions & 2 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@
</style>
<script>
var _hmt = _hmt || [];
var isGithub = location.host.indexOf('github') !== -1;
var src = isGithub ? 'https://hm.baidu.com/hm.js?b3ef688fa86bfb75027f1b410180a867' : 'https://hm.baidu.com/hm.js?1564b57c5b8f74933e4fedca9dc75b0d';
var srcMap = {
'vuecomponent.github.io': 'https://hm.baidu.com/hm.js?b3ef688fa86bfb75027f1b410180a867',
'tangjinzhou.gitee.io': 'https://hm.baidu.com/hm.js?1564b57c5b8f74933e4fedca9dc75b0d',
'ant-design-vue.gitee.io': 'https://hm.baidu.com/hm.js?1e30265f06f76fabfcdb7ed272017441',
'vue.ant.design': 'https://hm.baidu.com/hm.js?f0ba868f114e674b816b4880f7525811',
};
var src = srcMap[location.host];
(function() {
var hm = document.createElement('script');
hm.src = src;
Expand Down

0 comments on commit ccbb887

Please sign in to comment.