1002884655 vor 3 Jahren
Ursprung
Commit
e750f7afa6

+ 12
- 0
src/pages/index/buildingDetail/index.jsx Datei anzeigen

8
 import useParams from '@/utils/hooks/useParams'
8
 import useParams from '@/utils/hooks/useParams'
9
 import useShare from '@/utils/hooks/useShare'
9
 import useShare from '@/utils/hooks/useShare'
10
 import usePoster from '@/utils/hooks/usePoster'
10
 import usePoster from '@/utils/hooks/usePoster'
11
+import { savePoint } from '@/services/common'
11
 import DetailBottom from './components/DetailBottom/index'
12
 import DetailBottom from './components/DetailBottom/index'
12
 import BuildingDetailBanner from './components/BuildingDetailBanner/index'
13
 import BuildingDetailBanner from './components/BuildingDetailBanner/index'
13
 import BasicInfo from './components/BasicInfo/index'
14
 import BasicInfo from './components/BasicInfo/index'
45
     fullTrackData,
46
     fullTrackData,
46
   )
47
   )
47
 
48
 
49
+  useEffect(() => {
50
+    if(trackData.eventType && DetailInfo.buildingId) {
51
+      savePoint({
52
+        ...trackData,
53
+        event: 'detail',
54
+        eventType: 'building',
55
+        targetType: 'building'
56
+      })
57
+    }
58
+  }, [trackData, DetailInfo])
59
+
48
   // 海报
60
   // 海报
49
   const posterData = usePoster(person, DetailInfo?.poster, router, paramsRef)
61
   const posterData = usePoster(person, DetailInfo?.poster, router, paramsRef)
50
 
62
 

+ 13
- 1
src/pages/index/newsDetail/index.jsx Datei anzeigen

1
 import { useState, useEffect } from "react";
1
 import { useState, useEffect } from "react";
2
 import Taro from "@tarojs/taro";
2
 import Taro from "@tarojs/taro";
3
 import withLayout from "@/layout";
3
 import withLayout from "@/layout";
4
-import { ScrollView, Image, RichText, WebView } from "@tarojs/components";
4
+import { ScrollView, RichText, WebView } from "@tarojs/components";
5
 import useParams from '@/utils/hooks/useParams'
5
 import useParams from '@/utils/hooks/useParams'
6
 import useFavor from "@/utils/hooks/useFavor";
6
 import useFavor from "@/utils/hooks/useFavor";
7
 import { queryNewsDetail } from "@/services/news";
7
 import { queryNewsDetail } from "@/services/news";
8
 import { formatDate } from "@/utils/chatDate";
8
 import { formatDate } from "@/utils/chatDate";
9
 import useShare from "@/utils/hooks/useShare";
9
 import useShare from "@/utils/hooks/useShare";
10
+import { savePoint } from '@/services/common'
10
 import "@/assets/css/iconfont.css";
11
 import "@/assets/css/iconfont.css";
11
 import "./index.scss";
12
 import "./index.scss";
12
 
13
 
35
     fullTrackData
36
     fullTrackData
36
   );
37
   );
37
 
38
 
39
+  useEffect(() => {
40
+    if(trackData.eventType && (data || {}).newsId) {
41
+      savePoint({
42
+        ...trackData,
43
+        event: 'detail',
44
+        eventType: 'news',
45
+        targetType: 'news'
46
+      })
47
+    }
48
+  }, [trackData, data])
49
+
38
   const getData = (params) => {
50
   const getData = (params) => {
39
     Taro.showLoading();
51
     Taro.showLoading();
40
     queryNewsDetail(params).then((res) => {
52
     queryNewsDetail(params).then((res) => {

+ 7
- 0
src/subpackages/pages/consultant/myHomepage/index.jsx Datei anzeigen

8
 import { API_CARDS_UV, API_ITEMS_DETAIL, API_CARDS_LIST } from '@/constants/api'
8
 import { API_CARDS_UV, API_ITEMS_DETAIL, API_CARDS_LIST } from '@/constants/api'
9
 import { getImgURL } from '@/utils/image'
9
 import { getImgURL } from '@/utils/image'
10
 import useLike from "@/utils/hooks/useLike";
10
 import useLike from "@/utils/hooks/useLike";
11
+import { savePoint } from '@/services/common'
11
 import '@/assets/css/iconfont.css'
12
 import '@/assets/css/iconfont.css'
12
 import './index.scss'
13
 import './index.scss'
13
 
14
 
47
       if(id) {
48
       if(id) {
48
         fetch({ url: `${API_CARDS_LIST}/${id}`, method: 'get' }).then((res) => {
49
         fetch({ url: `${API_CARDS_LIST}/${id}`, method: 'get' }).then((res) => {
49
           setUserInfo(res)
50
           setUserInfo(res)
51
+          savePoint({
52
+            ...trackData,
53
+            event: 'detail',
54
+            eventType: 'card',
55
+            targetType: 'card'
56
+          })
50
         })
57
         })
51
       } else {
58
       } else {
52
         setPersonId(user.userInfo.person.personId)
59
         setPersonId(user.userInfo.person.personId)