Explorar el Código

add baidu ajax pageview

Michael Wang hace 6 años
padre
commit
dc678be107
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  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 {