@@ -36,6 +36,17 @@ let scrollRaf: number | null = null;
3636let pointerRaf: number | null = null ;
3737let sectionObserver: IntersectionObserver | null = null ;
3838
39+ function ensureBusuanziScriptLoaded() {
40+ const scriptId = " busuanzi-script" ;
41+ if (document .getElementById (scriptId )) return ;
42+
43+ const script = document .createElement (" script" );
44+ script .id = scriptId ;
45+ script .async = true ;
46+ script .src = " https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" ;
47+ document .body .appendChild (script );
48+ }
49+
3950function toggleLanguageSwitcher() {
4051 isLanguageOpen .value = ! isLanguageOpen .value ;
4152}
@@ -199,6 +210,7 @@ onMounted(async () => {
199210
200211 setupSectionObserver ();
201212 setupMemberCardHoverZIndex ();
213+ ensureBusuanziScriptLoaded ();
202214});
203215
204216watch (
@@ -293,6 +305,46 @@ onUnmounted(() => {
293305 <span >{{ t("footer.copyright", { year: currentYear }) }}</span >
294306 <span class =" footer-divider" aria-hidden =" true" > · </span >
295307 <a href =" https://beian.miit.gov.cn/" target =" _blank" rel =" noopener noreferrer" >蜀ICP备2023035054号-3</a >
308+ <span class =" busuanzi" aria-label =" 访问统计" >
309+ <span class =" busuanzi-row" >
310+ <span id =" busuanzi_container_site_uv" >
311+ <span class =" busuanzi-item" aria-label =" UV" >
312+ <svg class =" busuanzi-icon" viewBox =" 0 0 24 24" fill =" none" aria-hidden =" true" >
313+ <path
314+ d =" M16 7c0 2.21-1.79 4-4 4S8 9.21 8 7s1.79-4 4-4 4 1.79 4 4Z"
315+ stroke =" currentColor"
316+ stroke-width =" 1.8"
317+ />
318+ <path
319+ d =" M5 20c0-3.31 3.13-6 7-6s7 2.69 7 6"
320+ stroke =" currentColor"
321+ stroke-width =" 1.8"
322+ stroke-linecap =" round"
323+ />
324+ </svg >
325+ <span id =" busuanzi_value_site_uv" ></span >
326+ </span >
327+ </span >
328+ <span id =" busuanzi_container_site_pv" >
329+ <span class =" busuanzi-item" aria-label =" PV" >
330+ <svg class =" busuanzi-icon" viewBox =" 0 0 24 24" fill =" none" aria-hidden =" true" >
331+ <path
332+ d =" M2.5 12s3.5-7 9.5-7 9.5 7 9.5 7-3.5 7-9.5 7-9.5-7-9.5-7Z"
333+ stroke =" currentColor"
334+ stroke-width =" 1.8"
335+ stroke-linejoin =" round"
336+ />
337+ <path
338+ d =" M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
339+ stroke =" currentColor"
340+ stroke-width =" 1.8"
341+ />
342+ </svg >
343+ <span id =" busuanzi_value_site_pv" ></span >
344+ </span >
345+ </span >
346+ </span >
347+ </span >
296348 </p >
297349 </div >
298350 </footer >
0 commit comments