|
@@ -2,6 +2,8 @@ import Vue from 'vue'
|
|
|
import VueRouter from 'vue-router'
|
|
|
import store from '@/store'
|
|
|
|
|
|
+declare const _hmt: any
|
|
|
+
|
|
|
if (process.env.NODE_DEV !== 'production') {
|
|
|
Vue.use(VueRouter)
|
|
|
}
|
|
@@ -58,7 +60,11 @@ myRouter.beforeEach((to, from, next) => {
|
|
|
// 设置页面标题
|
|
|
document.title = to.meta.title
|
|
|
store.commit('updatePageTitle', to.meta.title)
|
|
|
-
|
|
|
+ try {
|
|
|
+ ;(_hmt as any).push(['_trackPageview', to.fullPath])
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error)
|
|
|
+ }
|
|
|
// 页面切换动画
|
|
|
if (to.params.direction) {
|
|
|
store.commit('updateDirection', to.params.direction)
|
|
@@ -79,7 +85,6 @@ myRouter.beforeEach((to, from, next) => {
|
|
|
store.commit('updateDirection', 'forward')
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
next()
|
|
|
})
|
|
|
|