From 16ba86ee719186028da848595f1aced959fab4d7 Mon Sep 17 00:00:00 2001 From: yubaolee Date: Wed, 19 Jun 2024 20:49:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vuepress/config.js | 12 ++++++++++-- docs/.vuepress/enhanceApp.js | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 53ee13a5..874c95a9 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -1,7 +1,7 @@ /* * @Author: yubaolee | ahfu~ <954478625@qq.com> * @Date: 2023-08-12 10:48:24 - * @LastEditTime: 2024-06-19 20:42:17 + * @LastEditTime: 2024-06-19 20:48:12 * @Description: * @ * @Copyright (c) 2023 by yubaolee | ahfu~ , All Rights Reserved. @@ -14,7 +14,15 @@ module.exports = { ['link', { rel: 'icon', href: '/logo.png' - }] + }],['script',{}, + `var _hmt = _hmt || []; + (function () { + var hm = document.createElement('script') + hm.src = 'https://hm.baidu.com/hm.js?93a7b9a145222f9b7109d643a0c58f8d' + var s = document.getElementsByTagName('script')[0] + s.parentNode.insertBefore(hm, s) + })(); + `] ], extendMarkdown: (md) => { md.set({ diff --git a/docs/.vuepress/enhanceApp.js b/docs/.vuepress/enhanceApp.js index c2a883a8..c6ea1096 100644 --- a/docs/.vuepress/enhanceApp.js +++ b/docs/.vuepress/enhanceApp.js @@ -1,7 +1,7 @@ /* * @Author: yubaolee | ahfu~ <954478625@qq.com> * @Date: 2024-06-19 20:41:42 - * @LastEditTime: 2024-06-19 20:42:39 + * @LastEditTime: 2024-06-19 20:48:04 * @Description: * @ * @Copyright (c) 2024 by yubaolee | ahfu~ , All Rights Reserved. @@ -16,7 +16,7 @@ export default ({ router }) => { hm.src = 'https://hm.baidu.com/hm.js?93a7b9a145222f9b7109d643a0c58f8d' var s = document.getElementsByTagName('script')[0] s.parentNode.insertBefore(hm, s) - })() + })(); // 路由切换时触发百度统计 router.afterEach(function (to) {