chore: 还原naive初始化

This commit is contained in:
xingyu4j
2025-10-16 10:16:45 +08:00
parent b28a35cd79
commit bc6d0f7dd6
244 changed files with 669 additions and 26673 deletions

View File

@@ -1,30 +0,0 @@
import type { Router } from 'vue-router';
declare global {
interface Window {
_hmt: any[];
}
}
const HM_ID = import.meta.env.VITE_APP_BAIDU_CODE;
/**
* 设置百度统计
* @param router
*/
function setupBaiduTongJi(router: Router) {
// 如果没有配置百度统计的 ID则不进行设置
if (!HM_ID) {
return;
}
// _hmt用于 router push
window._hmt = window._hmt || [];
router.afterEach((to) => {
// 添加到 _hmt 中
window._hmt.push(['_trackPageview', to.fullPath]);
});
}
export { setupBaiduTongJi };