mirror of
https://github.com/HamCQ/Handbook.git
synced 2026-10-02 04:47:21 +00:00
feat:支持vuepress+vdoing
This commit is contained in:
1 parent
68052ecc4e
commit
e638e13b4f
48 files changed
+9247
-34
No files matched your search
@@ -0,0 +1,19 @@
|
||||
export default ({ router }) => {
|
||||
/**
|
||||
* 路由切换事件处理
|
||||
*/
|
||||
router.beforeEach((to, from, next) => {
|
||||
console.log("切换路由", to.fullPath, from.fullPath);
|
||||
|
||||
//触发百度的pv统计
|
||||
if (typeof _hmt != "undefined") {
|
||||
if (to.path) {
|
||||
_hmt.push(["_trackPageview", to.fullPath]);
|
||||
console.log("上报百度统计", to.fullPath);
|
||||
}
|
||||
}
|
||||
|
||||
// continue
|
||||
next();
|
||||
});
|
||||
};
|
||||
Reference in new issue
Block a user