|
@@ -4,13 +4,13 @@ import { savePoint, updatePoint } from '@/services/common'
|
4
|
4
|
const pathEventTypeMap = {
|
5
|
5
|
// '' : 'agent', // 暂时不需要
|
6
|
6
|
// '' : 'info', // 暂时不需要
|
7
|
|
- 'pages/activity/detail/index' : { type: 'activity', desc: '活动' },
|
8
|
|
- 'pages/activity/detail/assistance' : { type: 'activity', desc: '活动' },
|
9
|
|
- 'pages/activity/detail/assemble' : { type: 'activity', desc: '活动' },
|
10
|
|
- 'pages/project/detail/index' : { type: 'building', desc: '项目' },
|
11
|
|
- 'pages/card/index' : { type: 'card', desc: '名片' },
|
12
|
|
- 'pages/project/index' : { type: 'main', desc: '首页' },
|
13
|
|
- 'pages/news/detail/index' : { type: 'news', desc: '资讯' },
|
|
7
|
+ 'pages/activity/detail/index': { type: 'activity', desc: '活动' },
|
|
8
|
+ 'pages/activity/detail/assistance': { type: 'activity', desc: '活动' },
|
|
9
|
+ 'pages/activity/detail/assemble': { type: 'activity', desc: '活动' },
|
|
10
|
+ 'pages/project/detail/index': { type: 'building', desc: '项目' },
|
|
11
|
+ 'pages/card/index': { type: 'card', desc: '名片' },
|
|
12
|
+ 'pages/project/index': { type: 'main', desc: '首页' },
|
|
13
|
+ 'pages/news/detail/index': { type: 'news', desc: '资讯' },
|
14
|
14
|
'pages/project/h5Page': { type: 'h5', desc: 'H5' },
|
15
|
15
|
}
|
16
|
16
|
|
|
@@ -21,7 +21,7 @@ const pathEventTypeMap = {
|
21
|
21
|
export async function trackUserSource(router) {
|
22
|
22
|
const { path, query, scene } = router || {}
|
23
|
23
|
|
24
|
|
- const pageInfo = pathEventTypeMap['path'] || { type: '', desc: '其他' }
|
|
24
|
+ const pageInfo = pathEventTypeMap[path] || { type: '', desc: '其他' }
|
25
|
25
|
|
26
|
26
|
const trackPayload = {
|
27
|
27
|
event: 'start',
|
|
@@ -34,12 +34,16 @@ export async function trackUserSource(router) {
|
34
|
34
|
}
|
35
|
35
|
|
36
|
36
|
try {
|
|
37
|
+ const sceneList = [1005, 1006, 1053, 1042, 1007, 1008, 1011, 1012, 1013, 1045, 1046, 1047, 1048, 1058, 1067, 1000]
|
|
38
|
+ if (sceneList.indexOf(trackPayload.sceneId) != -1) {
|
37
|
39
|
|
38
|
|
- const { recordId } = await savePoint(trackPayload)
|
39
|
|
- return function () { updatePoint(recordId); }
|
|
40
|
+ const { recordId } = await savePoint(trackPayload)
|
|
41
|
+ return function () { updatePoint(recordId); }
|
|
42
|
+
|
|
43
|
+ }
|
40
|
44
|
|
41
|
45
|
} catch (e) {
|
42
|
46
|
console.error('进入小程序埋点出错:', e);
|
43
|
|
- return function(){}
|
|
47
|
+ return function () { }
|
44
|
48
|
}
|
45
|
49
|
}
|