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,10 +3,10 @@ module.exports = {
3 3
     NODE_ENV: '"production"'
4 4
   },
5 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 10
     OSS_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',
11 11
     OSS_FAST_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',
12 12
     ICON_FONT: '"https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/css/iconfont.ttf"',

+ 7
- 0
project.config.json View File

@@ -77,6 +77,13 @@
77 77
 					"pathName": "pages/chat/chatDetail/index",
78 78
 					"query": "friend=d060bba5d66221200d8b19e7fa8b020b",
79 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,6 +1,7 @@
1 1
 import { useState, useEffect } from 'react';
2 2
 import Taro from '@tarojs/taro';
3 3
 import withLayout from '@/layout';
4
+import { savePoint } from '@/services/common'
4 5
 import {
5 6
   ScrollView,
6 7
   Image,
@@ -30,7 +31,7 @@ import "./index.scss";
30 31
 
31 32
 export default withLayout((props) => {
32 33
   const { router, shareContent, trackData, person, page, showShareTimeline, setNavigationBarTitle } = props;
33
-  const { id } = router.params;
34
+  const { id, eventType } = router.params;
34 35
 
35 36
   const user = useSelector((state) => state.user);
36 37
 
@@ -51,12 +52,23 @@ export default withLayout((props) => {
51 52
       const maxperson = 10
52 53
       setSelector(times(maxperson).map((_, i) => `${i + 1}`));
53 54
 
54
-      setDetail(res ||{});
55
+      setDetail(res || {});
55 56
       setNavigationBarTitle(res?.title)
56 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 73
   const paramsRef = useParams({
62 74
     id,

+ 2
- 2
src/routes.js View File

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