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

修改百度统计

上级 1ddfeb22
......@@ -36,6 +36,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?c76848e923d1db9d7d57a23acccdde0d";
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>
......
......@@ -24,23 +24,8 @@ window.G = Vue.prototype.$GlobalVariable = {
}
Vue.prototype.$md5 = md5
// 百度统计
var _hmt = _hmt || [];
window._hmt = _hmt; // 将_hmt挂载到window下
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?c76848e923d1db9d7d57a23acccdde0d";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
/* 导航守卫 */
router.beforeEach(async (to, from, next) => {
if (_hmt) {
if (to.path) {
_hmt.push(['_trackPageview', '/#' + to.fullPath])
}
}
/* 设置 全局变量 */
BeforeRouter.globalVariable.init(Vue, { to, from, next })
if (to.meta.requiredLogin) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论