增加页面跳转统计

This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-03-28 16:20:20 +08:00
parent 09e57e8e1c
commit a615c0935e
28 changed files with 315 additions and 310 deletions

View File

@@ -1306,8 +1306,13 @@ const handleItem = (uni) => {
// 修改 url
const replaceState = (uni) => {
if (typeof window === "undefined") return;
const location = JSON.parse(JSON.stringify(window.location));
// 替换当前URL但不刷新页面
window.history.pushState({}, "", `${window.location.origin}/details/${uni}`);
console.log("uni",uni,"location",location);
if (location.pathname.indexOf(uni) == -1) XSTAT.trackNewPage();
};
let reportAlertShow = ref(false);