From fa12a2ec1850a41e9575602ef00fce590438643a Mon Sep 17 00:00:00 2001 From: zhengjie <201507802@qq.com> Date: Wed, 3 Feb 2021 17:12:59 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96](v2.6)?= =?UTF-8?q?=EF=BC=9A=E5=8A=A0=E5=85=A5=E7=99=BE=E5=BA=A6=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 11 ++++++++++- src/router/index.js | 9 +++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index e918500..28c3fed 100644 --- a/public/index.html +++ b/public/index.html @@ -5,7 +5,16 @@ - + + <%= webpackConfig.name %> diff --git a/src/router/index.js b/src/router/index.js index 7410141..9cd2224 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -12,6 +12,15 @@ NProgress.configure({ showSpinner: false })// NProgress Configuration const whiteList = ['/login']// no redirect whitelist router.beforeEach((to, from, next) => { + setTimeout(() => { + var _hmt = _hmt || []; + (function() { + var hm = document.createElement('script') + hm.src = 'https://hm.baidu.com/hm.js?90f1bda302c625462ddc43ce252b821b' + var s = document.getElementsByTagName('script')[0] + s.parentNode.insertBefore(hm, s) + })() + }, 0) if (to.meta.title) { document.title = to.meta.title + ' - ' + Config.title }