diff --git a/osgraph-web/index.html b/osgraph-web/index.html index 0d72f52..62453f6 100644 --- a/osgraph-web/index.html +++ b/osgraph-web/index.html @@ -23,6 +23,11 @@ // 解决 Multiple instances of Three.js being imported.的 warning, 参考:https://yanyunfeng.com/article/2 window.__THREE__ = null; +
diff --git a/osgraph-web/src/constants/log.ts b/osgraph-web/src/constants/log.ts new file mode 100644 index 0000000..ca10780 --- /dev/null +++ b/osgraph-web/src/constants/log.ts @@ -0,0 +1 @@ +export const SPAPOS = "a4378"; \ No newline at end of file diff --git a/osgraph-web/src/global.d.ts b/osgraph-web/src/global.d.ts new file mode 100644 index 0000000..ce974c0 --- /dev/null +++ b/osgraph-web/src/global.d.ts @@ -0,0 +1,3 @@ +interface Window { + Tracert: any; +} \ No newline at end of file diff --git a/osgraph-web/src/home/index.tsx b/osgraph-web/src/home/index.tsx index 1ff62c1..eb191f7 100644 --- a/osgraph-web/src/home/index.tsx +++ b/osgraph-web/src/home/index.tsx @@ -10,9 +10,17 @@ import { TUGRAPH_TECH, X_LAB_GITHUB, } from "../constants/links"; +import { SPAPOS } from "../constants/log"; import { getIsMobile } from "../utils/isMobile"; import styles from "./index.module.less"; +window?.Tracert?.call?.("set", { + spmAPos: SPAPOS, + spmBPos: location.pathname, + pathName: "首页" +}); +window?.Tracert?.call?.("logPv"); + const HomePage: React.FC = () => { const [needFixed, setNeedFixed] = useState