Browse Source

信息修改

1002884655 3 years ago
parent
commit
fe7c81a7ac
4 changed files with 27 additions and 8 deletions
  1. 4
    4
      config/prod.js
  2. 7
    0
      project.config.json
  3. 14
    2
      src/pages/index/activityDetail/index.jsx
  4. 2
    2
      src/routes.js

+ 4
- 4
config/prod.js View File

3
     NODE_ENV: '"production"'
3
     NODE_ENV: '"production"'
4
   },
4
   },
5
   defineConstants: {
5
   defineConstants: {
6
-    HOST: '"https://www.newhousehold.cn"', //正式
7
-    WSS_HOST: '"wss://www.newhousehold.cn"',
8
-    // HOST: '"https://xlk.njyz.tech"', //正式
9
-    // WSS_HOST: '"wss://xlk.njyz.tech"',
6
+    // HOST: '"https://www.newhousehold.cn"', //正式
7
+    // WSS_HOST: '"wss://www.newhousehold.cn"',
8
+    HOST: '"https://xlk.njyz.tech"', //正式
9
+    WSS_HOST: '"wss://xlk.njyz.tech"',
10
     OSS_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',
10
     OSS_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',
11
     OSS_FAST_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',
11
     OSS_FAST_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',
12
     ICON_FONT: '"https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/css/iconfont.ttf"',
12
     ICON_FONT: '"https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/css/iconfont.ttf"',

+ 7
- 0
project.config.json View File

77
 					"pathName": "pages/chat/chatDetail/index",
77
 					"pathName": "pages/chat/chatDetail/index",
78
 					"query": "friend=d060bba5d66221200d8b19e7fa8b020b",
78
 					"query": "friend=d060bba5d66221200d8b19e7fa8b020b",
79
 					"scene": null
79
 					"scene": null
80
+				},
81
+				{
82
+					"id": -1,
83
+					"name": "pages/index/activityDetail/index",
84
+					"pathName": "pages/index/activityDetail/index",
85
+					"query": "id=5e1e226d71d7774ba8166440aed78a11&eventType=dymic",
86
+					"scene": null
80
 				}
87
 				}
81
 			]
88
 			]
82
 		}
89
 		}

+ 14
- 2
src/pages/index/activityDetail/index.jsx View File

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 { savePoint } from '@/services/common'
4
 import {
5
 import {
5
   ScrollView,
6
   ScrollView,
6
   Image,
7
   Image,
30
 
31
 
31
 export default withLayout((props) => {
32
 export default withLayout((props) => {
32
   const { router, shareContent, trackData, person, page, showShareTimeline, setNavigationBarTitle } = props;
33
   const { router, shareContent, trackData, person, page, showShareTimeline, setNavigationBarTitle } = props;
33
-  const { id } = router.params;
34
+  const { id, eventType } = router.params;
34
 
35
 
35
   const user = useSelector((state) => state.user);
36
   const user = useSelector((state) => state.user);
36
 
37
 
51
       const maxperson = 10
52
       const maxperson = 10
52
       setSelector(times(maxperson).map((_, i) => `${i + 1}`));
53
       setSelector(times(maxperson).map((_, i) => `${i + 1}`));
53
 
54
 
54
-      setDetail(res ||{});
55
+      setDetail(res || {});
55
       setNavigationBarTitle(res?.title)
56
       setNavigationBarTitle(res?.title)
56
       Taro.hideLoading();
57
       Taro.hideLoading();
57
     });
58
     });
58
   };
59
   };
59
 
60
 
61
+  useEffect(() => {
62
+    console.log(trackData, detail)
63
+    if(trackData.eventType && detail.dynamicId) {
64
+      savePoint({
65
+        ...trackData,
66
+        event: 'detail',
67
+        eventType
68
+      })
69
+    }
70
+  }, [trackData, detail])
71
+
60
   // 本页面分享或者海报参数
72
   // 本页面分享或者海报参数
61
   const paramsRef = useParams({
73
   const paramsRef = useParams({
62
     id,
74
     id,

+ 2
- 2
src/routes.js View File

241
     name: '直播活动',
241
     name: '直播活动',
242
     page: 'pages/video/liveDetail/index',
242
     page: 'pages/video/liveDetail/index',
243
     pkg: 'main',
243
     pkg: 'main',
244
-    type: 'activity',
244
+    type: 'live',
245
   },
245
   },
246
   {
246
   {
247
     name: '视频详情',
247
     name: '视频详情',
248
     page: 'pages/video/videoDetail/index',
248
     page: 'pages/video/videoDetail/index',
249
     pkg: 'main',
249
     pkg: 'main',
250
-    type: 'other',
250
+    type: 'live',
251
   },
251
   },
252
 
252
 
253
   // 我的
253
   // 我的