提交 3c267865 authored 作者: lihuihui's avatar lihuihui

添加百度统计代码

上级 fddd7b34
......@@ -8,7 +8,7 @@
<!-- <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> -->
<!-- <meta http-equiv="Pragma" content="no-cache" /> -->
<!-- <meta http-equiv="Expires" content="0" /> -->
<title>康博斯威尔大学蒙台梭利教育硕士</title>
<title>儿童教育硕士-蒙台梭利教师资格证-蒙特梭利教师资格证-康博斯威尔大学蒙台梭利教育硕士项目</title>
<!-- <meta
name="viewport"
id="viewport"
......
......@@ -36,10 +36,26 @@ window.Promise = Promise
*/
Vue.prototype.VueEvent = new Vue()
// 百度统计
var _hmt = []
_hmt = _hmt || []
window._hmt = _hmt;
(function () {
var hm = document.createElement('script')
hm.src = 'https://hm.baidu.com/hm.js?bb0331ee1f5ca09758ebee99ec9c7b87'
var s = document.getElementsByTagName('script')[0]
s.parentNode.insertBefore(hm, s)
})()
/* 创建实例之前,通过导航守卫,处理部分逻辑,如:是否直接进入系统 */
const before = createBefore()
/* 导航守卫 */
router.beforeEach(async (to, from, next) => {
if (_hmt) {
if (to.path) {
_hmt.push(['_trackPageview', '/#' + to.fullPath])
}
}
await store.dispatch('generateRoutes')
before.update(to, from, next)
})
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论