index.vue 578 B

123456789101112131415161718192021
  1. <template>
  2. <div></div>
  3. </template>
  4. <script lang="ts" setup>
  5. defineOptions({
  6. name: 'VabStatistics',
  7. })
  8. // 网站访问量统计 如不需要请自行注释
  9. onBeforeMount(() => {
  10. if (location.hostname !== 'localhost' && !location.hostname.includes('127') && !location.hostname.includes('192')) {
  11. ;(function () {
  12. const hm = document.createElement('script')
  13. hm.src = 'https://hm.baidu.com/hm.js?820b686671af452e8a4e18952ce946d8'
  14. const s: any = document.getElementsByTagName('script')[0]
  15. s.parentNode.insertBefore(hm, s)
  16. })()
  17. }
  18. })
  19. </script>