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

修改百度统计

上级 3c267865
......@@ -48,6 +48,15 @@
type="text/javascript"
src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/common/runtime.js"
></script>
<script>
var _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);
})();
</script>
<!--[if lt IE 9]>
<script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/console-polyfill.js"></script>
<script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/html5shiv.min.js"></script>
......
......@@ -36,26 +36,10 @@ 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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论