1002884655 3 лет назад
Родитель
Сommit
a425f6a02f
2 измененных файлов: 15 добавлений и 3 удалений
  1. 2
    2
      src/pages/index/activityDetail/index.jsx
  2. 13
    1
      src/pages/video/liveDetail/index.jsx

+ 2
- 2
src/pages/index/activityDetail/index.jsx Просмотреть файл

@@ -59,12 +59,12 @@ export default withLayout((props) => {
59 59
   };
60 60
 
61 61
   useEffect(() => {
62
-    console.log(trackData, detail)
63 62
     if(trackData.eventType && detail.dynamicId) {
64 63
       savePoint({
65 64
         ...trackData,
66 65
         event: 'detail',
67
-        eventType
66
+        eventType,
67
+        targetType: eventType
68 68
       })
69 69
     }
70 70
   }, [trackData, detail])

+ 13
- 1
src/pages/video/liveDetail/index.jsx Просмотреть файл

@@ -1,5 +1,6 @@
1 1
 import { useState, useEffect, useRef } from "react";
2
-import Taro, { useDidShow, useReady } from "@tarojs/taro";
2
+import Taro from "@tarojs/taro";
3
+import { savePoint } from '@/services/common'
3 4
 import withLayout from "@/layout";
4 5
 import { Image } from "@tarojs/components";
5 6
 import { queryLiveDetail } from "@/services/item";
@@ -49,6 +50,17 @@ export default withLayout((props) => {
49 50
     })
50 51
   };
51 52
 
53
+  useEffect(() => {
54
+    if(trackData.eventType && data.liveActivityId) {
55
+      savePoint({
56
+        ...trackData,
57
+        event: 'detail',
58
+        eventType: 'look',
59
+        targetType: 'look'
60
+      })
61
+    }
62
+  }, [trackData, data])
63
+
52 64
   const handleLive = () => {
53 65
     if (!livingRef.current) {
54 66
       Taro.showToast({