浏览代码

savepoint

xujing 5 年前
父节点
当前提交
ae6451ffc3
共有 4 个文件被更改,包括 47 次插入14 次删除
  1. 4
    4
      config/dev.js
  2. 4
    2
      config/prod.js
  3. 31
    8
      src/onlineSelling/pages/houseList/index.js
  4. 8
    0
      src/onlineSelling/pages/live/index.js

+ 4
- 4
config/dev.js 查看文件

3
     NODE_ENV: '"development"'
3
     NODE_ENV: '"development"'
4
   },
4
   },
5
   defineConstants: {
5
   defineConstants: {
6
-    // HOST: '"https://dev.fangdeal.cn"',//测试
7
-    // WSS_HOST: '"wss://dev.fangdeal.cn"',
8
-    HOST: '"http://192.168.2.41:8080"',
9
-    WSS_HOST: '"ws://192.168.2.41:8080"',
6
+    HOST: '"https://dev.fangdeal.cn"',//测试
7
+    WSS_HOST: '"wss://dev.fangdeal.cn"',
8
+    // HOST: '"http://192.168.2.41:8080"',
9
+    // WSS_HOST: '"ws://192.168.2.41:8080"',
10
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
10
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
11
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
11
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
12
     Version: 'V3.5.22'
12
     Version: 'V3.5.22'

+ 4
- 2
config/prod.js 查看文件

3
     NODE_ENV: '"production"'
3
     NODE_ENV: '"production"'
4
   },
4
   },
5
   defineConstants: {
5
   defineConstants: {
6
-    HOST: '"https://wx.fangdeal.cn"',//正式
7
-    WSS_HOST: '"wss://wx.fangdeal.cn"',
6
+    HOST: '"https://dev.fangdeal.cn"',//正式
7
+    WSS_HOST: '"wss://dev.fangdeal.cn"',
8
+    // HOST: '"https://wx.fangdeal.cn"',//正式
9
+    // WSS_HOST: '"wss://wx.fangdeal.cn"',
8
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
10
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
9
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
11
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
10
     Version: 'V3.5.22'
12
     Version: 'V3.5.22'

+ 31
- 8
src/onlineSelling/pages/houseList/index.js 查看文件

26
 import * as houseActions from '@/actions/house'
26
 import * as houseActions from '@/actions/house'
27
 
27
 
28
 @connect(s => s.user, { ...houseActions })
28
 @connect(s => s.user, { ...houseActions })
29
-@withDetail({
30
-  track: {
31
-    event: 'house_list',
32
-    eventType: 'house',
33
-    propertyName: '查看房源列表',
34
-    data: '{}',
35
-  }
36
-})
29
+// @withDetail({
30
+//   track: {
31
+//     event: 'house_list',
32
+//     eventType: 'house',
33
+//     propertyName: '查看房源列表',
34
+//     data: '{}',
35
+//   }
36
+// })
37
 export default class HouseList extends Component {
37
 export default class HouseList extends Component {
38
   config = {
38
   config = {
39
     navigationBarTitleText: '房源',
39
     navigationBarTitleText: '房源',
62
     noRecord: false,
62
     noRecord: false,
63
     loading: true,
63
     loading: true,
64
     dataType: 1,
64
     dataType: 1,
65
+    recordId: undefined, // 埋点ID
65
   }
66
   }
66
 
67
 
67
 
68
 
75
     this.props.dispatchFlush2Cart([])
76
     this.props.dispatchFlush2Cart([])
76
   }
77
   }
77
 
78
 
79
+  componentWillUnmount() {
80
+    const { recordId } = this.state
81
+    recordId && updatePoint(recordId)
82
+  }
78
 
83
 
79
   componentWillReceiveProps() {
84
   componentWillReceiveProps() {
80
     this.reportClientFn()
85
     this.reportClientFn()
172
     this.reportClientFn()
177
     this.reportClientFn()
173
     let { qrcodeParams } = this.state
178
     let { qrcodeParams } = this.state
174
     const consultant = this.$router.params.consultant || qrcodeParams.consultant
179
     const consultant = this.$router.params.consultant || qrcodeParams.consultant
180
+    const consultantId = this.$router.params.consultantId || qrcodeParams.consultantId || ""
181
+    const recommender = this.$router.params.recommender || qrcodeParams.recommender || ""
175
 
182
 
176
     if (consultant) {
183
     if (consultant) {
177
       getCardDetail(consultant).then(res => {
184
       getCardDetail(consultant).then(res => {
188
         salesBatchDetail: res || {},
195
         salesBatchDetail: res || {},
189
         noRecord: res.status == '1' ? false : true
196
         noRecord: res.status == '1' ? false : true
190
       })
197
       })
198
+      savePoint({
199
+        event: 'house_list',
200
+        eventType: 'house',
201
+        propertyName: '查看房源列表',
202
+        targetId: res.salesBatchId || '',
203
+        buildingId: res.buildingId || '',
204
+        consultantId: consultantId,
205
+        sharePersonId: recommender,
206
+        data: '{}',
207
+
208
+      }).then(res => {
209
+        this.setState({
210
+          recordId: res.recordId
211
+        })
212
+        console.log('查看房源列表')
213
+      })
191
       const { templates = [], posterImg = '' } = (res.posters || [])[0] || {}
214
       const { templates = [], posterImg = '' } = (res.posters || [])[0] || {}
192
 
215
 
193
       this.setState({
216
       this.setState({

+ 8
- 0
src/onlineSelling/pages/live/index.js 查看文件

129
         liveDetail: res || {},
129
         liveDetail: res || {},
130
         noRecord: res.status == '1' ? false : true
130
         noRecord: res.status == '1' ? false : true
131
       })
131
       })
132
+      const { qrcodeParams } = this.state
133
+      const consultantId = this.$router.params.consultantId || qrcodeParams.consultantId || ""
134
+      const recommender = this.$router.params.recommender || qrcodeParams.recommender || ""
132
       savePoint({
135
       savePoint({
133
         event: 'detail',
136
         event: 'detail',
134
         eventType: 'activity',
137
         eventType: 'activity',
135
         targetType: 'live',
138
         targetType: 'live',
136
         targetId: id,
139
         targetId: id,
137
         propertyName: '查看直播详情页',
140
         propertyName: '查看直播详情页',
141
+        buildingId: res.buildingId || '',
142
+        consultantId: consultantId,
143
+        sharePersonId: recommender,
138
         data: '{}',
144
         data: '{}',
145
+
146
+
139
       }).then(res => {
147
       }).then(res => {
140
         this.setState({
148
         this.setState({
141
           recordId: res.recordId
149
           recordId: res.recordId