mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-07 13:07:58 +08:00
优化百度统计代码
This commit is contained in:
+2
-2
@@ -178,7 +178,7 @@ router.beforeEach(async(to, from, next) => {
|
||||
// 百度统计代码
|
||||
if (process.env.VUE_APP_TYPE == 'example') {
|
||||
if (window._hmt) {
|
||||
window._hmt.push(['_trackPageview', '/#' + to.fullPath])
|
||||
window._hmt.push(['_trackPageview', location.pathname + '#' + to.fullPath])
|
||||
}
|
||||
}
|
||||
next()
|
||||
@@ -195,7 +195,7 @@ router.beforeEach(async(to, from, next) => {
|
||||
// 百度统计代码
|
||||
if (process.env.VUE_APP_TYPE == 'example') {
|
||||
if (window._hmt) {
|
||||
window._hmt.push(['_trackPageview', '/#' + to.fullPath])
|
||||
window._hmt.push(['_trackPageview', location.pathname + '#' + to.fullPath])
|
||||
}
|
||||
}
|
||||
next()
|
||||
|
||||
Reference in New Issue
Block a user