修改统计代码
This commit is contained in:
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 () {
|
(function () {
|
||||||
var hm = document.createElement("script");
|
var hm = document.createElement("script");
|
||||||
hm.src = "//hm.baidu.com/hm.js?4bd66cbe45a640b607fe46c48f658746";
|
hm.src = "//hm.baidu.com/hm.js?4bd66cbe45a640b607fe46c48f658746";
|
||||||
var s = document.getElementsByTagName("script")[0];
|
var s = document.getElementsByTagName("script")[0];
|
||||||
s.parentNode.insertBefore(hm, s);
|
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>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
<!-- built files will be auto injected -->
|
<!-- 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>
|
</body>
|
||||||
|
|
||||||
|
|||||||
83
src/App.vue
83
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) => {
|
router.beforeEach((to, from, next) => {
|
||||||
//进度条开始
|
//进度条开始
|
||||||
NProgress.start();
|
NProgress.start();
|
||||||
@@ -142,7 +144,11 @@ router.beforeEach((to, from, next) => {
|
|||||||
let title = meta['title']
|
let title = meta['title']
|
||||||
if (title) setSeoTitle(title)
|
if (title) setSeoTitle(title)
|
||||||
|
|
||||||
|
if (isInitialNavigation) {
|
||||||
|
isInitialNavigation = false
|
||||||
|
} else {
|
||||||
|
return
|
||||||
|
console.log("1111111,", to.path, to.fullPath);
|
||||||
if (window._hmt) {
|
if (window._hmt) {
|
||||||
if (to.path) {
|
if (to.path) {
|
||||||
// window._hmt.push(['_trackPageview', '/#' + to.fullPath])
|
// window._hmt.push(['_trackPageview', '/#' + to.fullPath])
|
||||||
@@ -157,6 +163,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
// 用于发送某个URL的PV统计请求
|
// 用于发送某个URL的PV统计请求
|
||||||
window._czc.push(["_trackPageview", contentUrl, refererUrl])
|
window._czc.push(["_trackPageview", contentUrl, refererUrl])
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
router.afterEach(() => {
|
router.afterEach(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user