Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
hager
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-12-04 10:48:22 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
906f63cc8c9644429308b947505ea88e85e57982
906f63cc
1 parent
698f403c
✨ feat: 新增统计埋点和百度统计
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
3 deletions
index.html
src/common/mixin.js
src/components/common/hagerHeader.vue
src/views/about/index.vue
index.html
View file @
906f63c
...
...
@@ -12,5 +12,14 @@
<body>
<div
id=
"app"
></div>
<script
type=
"module"
src=
"/src/main.js"
></script>
<script>
var
_hmt
=
_hmt
||
[];
(
function
()
{
var
hm
=
document
.
createElement
(
"script"
);
hm
.
src
=
"https://hm.baidu.com/hm.js?20b21bb3d32d98b9a492070bd2566dfe"
;
var
s
=
document
.
getElementsByTagName
(
"script"
)[
0
];
s
.
parentNode
.
insertBefore
(
hm
,
s
);
})();
</script>
</body>
</html>
...
...
src/common/mixin.js
View file @
906f63c
/*
* @Date: 2022-07-26 09:49:54
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-1
1-07 16:20:26
* @LastEditTime: 2024-1
2-04 10:39:08
* @FilePath: /hager/src/common/mixin.js
* @Description: 文件描述
*/
import
$
from
'jquery'
;
import
{
throttle
}
from
'lodash-es'
;
import
axios
from
'@/utils/axios'
;
export
default
{
// 初始化设置
...
...
@@ -42,6 +44,10 @@ export default {
this
.
top_img_height
=
$
(
window
).
width
()
*
0.35
+
'px'
;
}
},
maEvent
:
throttle
(
function
()
{
var
p
=
Array
.
prototype
.
shift
.
call
(
arguments
);
return
axios
.
post
(
'/srv/?a=log&p='
+
p
)
},
1500
)
},
directives
:
{
clickOutside
:
{
...
...
src/components/common/hagerHeader.vue
View file @
906f63c
<!--
* @Date: 2024-09-26 13:42:11
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-1
1-11 12:14:54
* @LastEditTime: 2024-1
2-04 10:46:22
* @FilePath: /hager/src/components/common/hagerHeader.vue
* @Description: 文件描述
-->
...
...
@@ -356,6 +356,8 @@ export default {
path,
});
}
// TAG: 统计埋点
this.maEvent(`h_${path.slice(1)}`);
},
goToC (item) { // 跳转产品二级
this.$router.push({
...
...
src/views/about/index.vue
View file @
906f63c
<!--
* @Date: 2024-10-17 09:22:56
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-1
1-11 11:20:45
* @LastEditTime: 2024-1
2-04 10:47:34
* @FilePath: /hager/src/views/about/index.vue
* @Description: 文件描述
-->
...
...
@@ -129,6 +129,8 @@ export default {
this.$router.push({
path,
});
// TAG: 统计埋点
this.maEvent(`h_${path.slice(7)}`);
}
}
}
...
...
Please
register
or
login
to post a comment