Browse Source

feat(pv): 修复访问链接上报错误

zengzhixiang 2 years ago
parent
commit
8d49bdb768
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugins/baidu-tongji.js

+ 1 - 1
plugins/baidu-tongji.js

@@ -6,7 +6,7 @@ export default function (c, i) {
   window._hmt.push(['_setCustomVar', 1, 'MODE', process.env.MODE, 1]);
   app.router.afterEach((to, from) => {
     // 上报PV
-    window._hmt.push(['_trackPageview', to.fullPath]);
+    window._hmt.push(['_trackPageview', c.base + to.path.slice(1)]);
   });
 
   app.head.script = app.head.script || [];