提交 de60974a authored 作者: lihuihui's avatar lihuihui

添加百度统计代码

上级 820c2522
......@@ -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"
......
......@@ -38,10 +38,25 @@ window.G = Vue.prototype.$GLOBAL = {
*/
Vue.prototype.VueEvent = new Vue()
// 百度统计
var _hmt = []
window._hmt = _hmt;
(function () {
var hm = document.createElement('script')
hm.src = 'https://hm.baidu.com/hm.js?cf6abc443c671006d39a7cb1f181a153'
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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论