File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
docs/.vuepress/components Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 3
3
<template #top >
4
4
<div class =" ss" >
5
5
<div class =" sidebar-ad-placeholder" >
6
- <a href =" https://doc.hutool.cn/" target =" _blank" >
6
+ <a href =" https://doc.hutool.cn/" target =" _blank" @click = " handleAdClick " >
7
7
<img src =" /img/ss/hutool.pic.jpg" alt =" Hutool" style =" max-width : 90% ; height : auto ;" />
8
8
</a >
9
9
</div >
@@ -43,6 +43,22 @@ const isDrivers = computed(() => {
43
43
});
44
44
45
45
const showMingdao = false ;
46
+
47
+ const handleAdClick = async () => {
48
+ try {
49
+ await fetch (' https://api.hutool.cn/blade-adv/stats' , {
50
+ method: ' POST' ,
51
+ headers: {
52
+ ' Content-Type' : ' application/json' ,
53
+ },
54
+ body: JSON .stringify ({
55
+ name: " hutool"
56
+ })
57
+ });
58
+ } catch (error ) {
59
+ console .error (' 广告统计请求失败:' , error );
60
+ }
61
+ };
46
62
</script >
47
63
48
64
<style scoped lang="scss">
You can’t perform that action at this time.
0 commit comments