1002884655 3 年 前
コミット
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
   };
59
   };
60
 
60
 
61
   useEffect(() => {
61
   useEffect(() => {
62
-    console.log(trackData, detail)
63
     if(trackData.eventType && detail.dynamicId) {
62
     if(trackData.eventType && detail.dynamicId) {
64
       savePoint({
63
       savePoint({
65
         ...trackData,
64
         ...trackData,
66
         event: 'detail',
65
         event: 'detail',
67
-        eventType
66
+        eventType,
67
+        targetType: eventType
68
       })
68
       })
69
     }
69
     }
70
   }, [trackData, detail])
70
   }, [trackData, detail])

+ 13
- 1
src/pages/video/liveDetail/index.jsx ファイルの表示

1
 import { useState, useEffect, useRef } from "react";
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
 import withLayout from "@/layout";
4
 import withLayout from "@/layout";
4
 import { Image } from "@tarojs/components";
5
 import { Image } from "@tarojs/components";
5
 import { queryLiveDetail } from "@/services/item";
6
 import { queryLiveDetail } from "@/services/item";
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
   const handleLive = () => {
64
   const handleLive = () => {
53
     if (!livingRef.current) {
65
     if (!livingRef.current) {
54
       Taro.showToast({
66
       Taro.showToast({