|
@@ -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({
|