修改统计代码
This commit is contained in:
parent
51c7932205
commit
62677e7c81
4
dist/index.html
vendored
4
dist/index.html
vendored
@ -1,7 +1,7 @@
|
||||
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/favicon.ico"><title>港校租房</title><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/js/chunk-vendors.e0e9f2f6.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/js/app.d772b454.js"></script><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/css/chunk-vendors.7885d77e.css" rel="stylesheet"><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/css/app.872c0487.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but zufang doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><script src="https://app.gter.net/bottom?tpl=header&menukey=fang"></script><div id="app"></div><div style="display:none;"><script src="//v1.cnzz.com/z_stat.php?id=1281224882&web_id=1281224882"></script><script>var _hmt = _hmt || [];
|
||||
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/favicon.ico"><title>港校租房</title><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/js/chunk-vendors.e0e9f2f6.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/js/app.6c4d5548.js"></script><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/css/chunk-vendors.7885d77e.css" rel="stylesheet"><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/css/app.3ce72176.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but zufang doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><script src="https://app.gter.net/bottom?tpl=header&menukey=fang"></script><div id="app"></div><div style="display:none;"><script src="//v1.cnzz.com/z_stat.php?id=1281224882&web_id=1281224882"></script><script>var _hmt = _hmt || [];
|
||||
(function () {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "//hm.baidu.com/hm.js?4bd66cbe45a640b607fe46c48f658746";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();</script></div><script src="https://app.gter.net/bottom?tpl=footer"></script></body></html>
|
||||
})();</script></div></body></html>
|
1
dist/js/app.6c4d5548.js
vendored
Normal file
1
dist/js/app.6c4d5548.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/js/app.d772b454.js
vendored
1
dist/js/app.d772b454.js
vendored
File diff suppressed because one or more lines are too long
@ -31,7 +31,7 @@
|
||||
</script>
|
||||
</div>
|
||||
<!-- built files will be auto injected -->
|
||||
<script src="https://app.gter.net/bottom?tpl=footer"></script>
|
||||
<!-- <script src="https://app.gter.net/bottom?tpl=footer"></script> -->
|
||||
|
||||
</body>
|
||||
|
||||
|
255
src/App.vue
255
src/App.vue
File diff suppressed because one or more lines are too long
@ -131,6 +131,8 @@ const router = createRouter({
|
||||
})
|
||||
|
||||
|
||||
let isInitialNavigation = false
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
//进度条开始
|
||||
NProgress.start();
|
||||
@ -142,20 +144,25 @@ router.beforeEach((to, from, next) => {
|
||||
let title = meta['title']
|
||||
if (title) setSeoTitle(title)
|
||||
|
||||
|
||||
if (window._hmt) {
|
||||
if (to.path) {
|
||||
// window._hmt.push(['_trackPageview', '/#' + to.fullPath])
|
||||
window._hmt.push(['_trackPageview', to.fullPath])
|
||||
if (isInitialNavigation) {
|
||||
isInitialNavigation = false
|
||||
} else {
|
||||
return
|
||||
console.log("1111111,", to.path, to.fullPath);
|
||||
if (window._hmt) {
|
||||
if (to.path) {
|
||||
// window._hmt.push(['_trackPageview', '/#' + to.fullPath])
|
||||
window._hmt.push(['_trackPageview', to.fullPath])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (window._czc) {
|
||||
let location = window.location
|
||||
let contentUrl = location.pathname + location.hash
|
||||
let refererUrl = "/"
|
||||
// 用于发送某个URL的PV统计请求
|
||||
window._czc.push(["_trackPageview", contentUrl, refererUrl])
|
||||
if (window._czc) {
|
||||
let location = window.location
|
||||
let contentUrl = location.pathname + location.hash
|
||||
let refererUrl = "/"
|
||||
// 用于发送某个URL的PV统计请求
|
||||
window._czc.push(["_trackPageview", contentUrl, refererUrl])
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user