Ver Fonte

add baidu ajax pageview

Michael Wang há 6 anos atrás
pai
commit
dc678be107
1 ficheiros alterados com 5 adições e 0 exclusões
  1. 5 0
      src/router.js

+ 5 - 0
src/router.js

@@ -83,6 +83,11 @@ let router = new Router({
 
 router.beforeEach((to, from, next) => {
   const loginPath = "/login/" + localStorage.getItem("domain");
+
+  if (to.path) {
+    window._hmt.push(["_trackPageview", to.fullPath]);
+  }
+
   if (to.path.match(/^\/login\/.+$/)) {
     next();
   } else {