xujing 5 anni fa
parent
commit
e4f2d56ce4

+ 2
- 2
config/dev.js Vedi File

@@ -5,8 +5,8 @@ module.exports = {
5 5
   defineConstants: {
6 6
     HOST: '"https://dev.fangdeal.cn"', //测试
7 7
     WSS_HOST: '"wss://dev.fangdeal.cn"',
8
-    // HOST: '"http://192.168.1.100:8080"',
9
-    // WSS_HOST: '"ws://192.168.1.100:8080"',
8
+    // HOST: '"http://192.168.0.195:8080"', //魏超
9
+    // WSS_HOST: '"ws://192.168.0.195:8080"',
10 10
     OSS_PATH: "https://njcj.oss-cn-shanghai.aliyuncs.com/",
11 11
     OSS_FAST_PATH: "https://njcj.oss-accelerate.aliyuncs.com/",
12 12
     Version: "V3.5.28"

+ 3
- 4
src/actions/card.js Vedi File

@@ -17,13 +17,12 @@ import { createAction } from '@/utils/redux'
17 17
  * 获取卡片信息
18 18
  * @param {*} id 
19 19
  */
20
-export const dispatchCardInfo = id => createAction({
20
+export const dispatchCardInfo = (id, params) => createAction({
21 21
   url: `${API_CARDS_LIST}/${id}`,
22
-  type: CARD_INFO
22
+  type: CARD_INFO,
23
+  fetchOptions: params || {}
23 24
 })
24 25
 
25
-
26
-
27 26
 /**
28 27
  * 获取置业顾问列表
29 28
  */

+ 14
- 6
src/onlineSelling/pages/live/index.js Vedi File

@@ -47,6 +47,7 @@ export default class livePage extends Component {
47 47
     consultShow: false,  // 置业顾问悬浮框显示隐藏
48 48
     noRecord: false,
49 49
     recordId: undefined, // 埋点ID
50
+    queryInfo: {}
50 51
   }
51 52
 
52 53
 
@@ -93,7 +94,15 @@ export default class livePage extends Component {
93 94
 
94 95
     if (this.$router.params.scene) {
95 96
       getQrCodeParams(this.$router.params.scene).then((res) => {
96
-        this.setState({ id: res.id, qrcodeParams: res }, () => {
97
+        this.setState({
98
+          id: res.id,
99
+          qrcodeParams: res,
100
+          queryInfo: {
101
+            channelId: res.channelId || '',
102
+            qrCodeId: res.qrCodeId || '',
103
+            scene: this.$router.params.scene,
104
+          }
105
+        }, () => {
97 106
           this.anotherInfo(res.id)
98 107
         })
99 108
       })
@@ -111,7 +120,7 @@ export default class livePage extends Component {
111 120
   anotherInfo(id) {
112 121
 
113 122
     // this.reportClientFn()
114
-    let { qrcodeParams } = this.state
123
+    let { qrcodeParams, queryInfo } = this.state
115 124
     const consultant = Taro.getStorageSync('consultantId') || ''
116 125
     // const consultant = this.$router.params.consultant || qrcodeParams.consultant
117 126
 
@@ -124,13 +133,13 @@ export default class livePage extends Component {
124 133
       })
125 134
     }
126 135
 
127
-    queryLiveDetail(id).then(res => {
136
+    queryLiveDetail(id, queryInfo).then(res => {
128 137
 
129 138
       this.setState({
130 139
         liveDetail: res || {},
131 140
         noRecord: res.status == '1' ? false : true
132 141
       })
133
-      const { qrcodeParams } = this.state
142
+      const { qrcodeParams, queryInfo } = this.state
134 143
       const consultantId = this.$router.params.consultantId || qrcodeParams.consultantId || ""
135 144
       const recommender = this.$router.params.recommender || qrcodeParams.recommender || ""
136 145
       savePoint({
@@ -143,8 +152,7 @@ export default class livePage extends Component {
143 152
         consultantId: consultantId,
144 153
         sharePersonId: recommender,
145 154
         data: '{}',
146
-
147
-
155
+        ...queryInfo
148 156
       }).then(res => {
149 157
         this.setState({
150 158
           recordId: res.recordId

+ 4
- 5
src/pages/activity/detail/assemble.js Vedi File

@@ -217,7 +217,7 @@ export default class Detail extends Component {
217 217
       posterVisible: !posterVisible,
218 218
       actionSheetVisible: showActionSheet,
219 219
     })
220
-    const { detail: { groupActivityId, buildingId }, queryInfo } = this.state
220
+    const { detail: { groupActivityId, buildingId } } = this.state
221 221
 
222 222
 
223 223
     shareSavePoint({
@@ -228,7 +228,6 @@ export default class Detail extends Component {
228 228
       targetId: groupActivityId,
229 229
       buildingId: buildingId || '',
230 230
       data: '{}',
231
-      ...queryInfo
232 231
     }, 'group')
233 232
     // savePoint({
234 233
     //   event: 'poster',
@@ -352,7 +351,8 @@ export default class Detail extends Component {
352 351
         consultantId: consultantId,
353 352
         sharePersonId: recommender,
354 353
         targetId: id,
355
-        data: '{"recordId":"' + recordId + '"}'
354
+        data: '{"recordId":"' + recordId + '"}',
355
+        ...queryInfo
356 356
       }).then((res) => {
357 357
         this.setState({ pointRecordId: res.recordId })
358 358
       })
@@ -411,7 +411,7 @@ export default class Detail extends Component {
411 411
   }
412 412
 
413 413
   onShareAppMessage = (res) => {
414
-    const { shares, detail: { groupActivityId, activityName, mainImg, buildingId }, queryInfo = {} } = this.state
414
+    const { shares, detail: { groupActivityId, activityName, mainImg, buildingId } } = this.state
415 415
     const currentPage = `/${this.currentPageAndParams().join('?')}`
416 416
     // const currentPage = `/${this.currentPageAndParams(res.from).join('?')}`
417 417
     const { userInfo: { person: { personId, personType, userId } } } = this.props
@@ -427,7 +427,6 @@ export default class Detail extends Component {
427 427
       targetId: groupActivityId,
428 428
       buildingId: buildingId || '',
429 429
       data: '{}',
430
-      ...queryInfo
431 430
     }, 'group')
432 431
 
433 432
     const shareData = shares && shares.length ? shares[0] : { shareContentTitle: activityName, shareContentImg: mainImg };

+ 4
- 5
src/pages/activity/detail/assistance.js Vedi File

@@ -220,7 +220,7 @@ export default class Detail extends Component {
220 220
       posterVisible: !posterVisible,
221 221
       actionSheetVisible: showActionSheet,
222 222
     })
223
-    const { id, detail: { buildingId }, queryInfo = {} } = this.state
223
+    const { id, detail: { buildingId } } = this.state
224 224
 
225 225
     shareSavePoint({
226 226
       event: 'poster',
@@ -230,7 +230,6 @@ export default class Detail extends Component {
230 230
       targetId: id,
231 231
       buildingId: buildingId || '',
232 232
       data: '{}',
233
-      ...queryInfo
234 233
     }, 'help')
235 234
     // savePoint({
236 235
     //   event: 'poster',
@@ -354,7 +353,8 @@ export default class Detail extends Component {
354 353
         consultantId: consultantId,
355 354
         sharePersonId: recommender,
356 355
         targetId: id,
357
-        data: '{"initiateId":"' + initiateId + '"}'
356
+        data: '{"initiateId":"' + initiateId + '"}',
357
+        ...queryInfo
358 358
       }).then((res) => {
359 359
         this.setState({ pointRecordId: res.recordId })
360 360
       })
@@ -417,7 +417,7 @@ export default class Detail extends Component {
417 417
 
418 418
   onShareAppMessage = (res) => {
419 419
 
420
-    const { shares, id, detail: { title, img, buildingId }, queryInfo = {} } = this.state
420
+    const { shares, id, detail: { title, img, buildingId } } = this.state
421 421
     const currentPage = `/${this.currentPageAndParams().join('?')}`
422 422
     // const currentPage = `/${this.currentPageAndParams(res.from).join('?')}`
423 423
     const { userInfo: { person: { personId, personType, userId } } } = this.props
@@ -432,7 +432,6 @@ export default class Detail extends Component {
432 432
       targetId: id,
433 433
       buildingId: buildingId || '',
434 434
       data: '{}',
435
-      ...queryInfo
436 435
     }, 'help')
437 436
 
438 437
     // savePoint({

+ 4
- 5
src/pages/activity/detail/index.js Vedi File

@@ -126,7 +126,8 @@ export default class Detail extends Component {
126 126
         targetId: res.dynamicId,
127 127
         consultantId: consultantId,
128 128
         sharePersonId: recommender,
129
-        data: '{}'
129
+        data: '{}',
130
+        ...queryInfo
130 131
       }).then(res1 => {
131 132
         this.setState({
132 133
           recordId: res1.recordId
@@ -179,7 +180,7 @@ export default class Detail extends Component {
179 180
   //   }
180 181
   // }
181 182
   onShareAppMessage = () => {
182
-    const { detail: { shareContents, title, dynamicId, imgUrl, buildingId }, queryInfo = {} } = this.state
183
+    const { detail: { shareContents, title, dynamicId, imgUrl, buildingId } } = this.state
183 184
     const { userInfo: { person: { personId, personType, userId } } } = this.props
184 185
     console.log(dynamicId, "path")
185 186
     console.log(personId, "personId")
@@ -195,7 +196,6 @@ export default class Detail extends Component {
195 196
       targetId: dynamicId,
196 197
       buildingId: buildingId || '',
197 198
       data: '{}',
198
-      ...queryInfo
199 199
     }, 'activity')
200 200
 
201 201
     // addActivityShareNum(dynamicId)
@@ -342,7 +342,7 @@ export default class Detail extends Component {
342 342
         posterVisible: !!flag
343 343
       })
344 344
     }
345
-    const { detail: { dynamicId, buildingId }, queryInfo } = this.state
345
+    const { detail: { dynamicId, buildingId } } = this.state
346 346
     shareSavePoint({
347 347
       event: 'poster',
348 348
       eventType: 'activity',
@@ -351,7 +351,6 @@ export default class Detail extends Component {
351 351
       targetId: dynamicId,
352 352
       buildingId: buildingId || '',
353 353
       data: '{}',
354
-      ...queryInfo
355 354
     }, 'activity')
356 355
 
357 356
     // savePoint({

+ 15
- 6
src/pages/card/index.js Vedi File

@@ -46,6 +46,7 @@ export default class Index extends Component {
46 46
     bound: false,
47 47
     grantPhoneVisible: false, // 授权电话
48 48
     grantAvatarVisible: false, // 授权头像
49
+    queryInfo: {}
49 50
   }
50 51
 
51 52
   componentWillMount() {
@@ -73,10 +74,10 @@ export default class Index extends Component {
73 74
     })
74 75
     if (this.$router.params.loadInfo == 'need') {
75 76
       Taro.navigateBack({ delta: 1 })
76
-      const { cardId } = this.state
77
+      const { cardId, queryInfo } = this.state
77 78
       const { dispatchCardInfo, dispatchProjectDetail } = this.props
78 79
       Taro.showLoading()
79
-      dispatchCardInfo(cardId).then(res => {
80
+      dispatchCardInfo(cardId, { ...queryInfo }).then(res => {
80 81
         Taro.hideLoading()
81 82
         this.setState({
82 83
           loaded: true,
@@ -97,7 +98,14 @@ export default class Index extends Component {
97 98
     if (this.$router.params.scene) {
98 99
 
99 100
       getQrCodeParams(this.$router.params.scene).then(res => {
100
-        this.setState({ cardId: res.id, }, this.loadCardDetail)
101
+        this.setState({
102
+          cardId: res.id,
103
+          queryInfo: {
104
+            channelId: res.channelId || '',
105
+            qrCodeId: res.qrCodeId || '',
106
+            scene: this.$router.params.scene,
107
+          }
108
+        }, this.loadCardDetail)
101 109
         addCardUv(res.id)
102 110
       }).catch(err => {
103 111
         Taro.showToast({
@@ -150,10 +158,10 @@ export default class Index extends Component {
150 158
   }
151 159
 
152 160
   loadCardDetail() {
153
-    const { cardId } = this.state
161
+    const { cardId, queryInfo } = this.state
154 162
     const { dispatchCardInfo, dispatchProjectDetail } = this.props
155 163
     Taro.showLoading()
156
-    dispatchCardInfo(cardId).then(res => {
164
+    dispatchCardInfo(cardId, { ...queryInfo }).then(res => {
157 165
       Taro.hideLoading()
158 166
       this.setState({
159 167
         loaded: true,
@@ -169,7 +177,8 @@ export default class Index extends Component {
169 177
         propertyName: '个人主页',
170 178
         buildingId: buildingId,
171 179
         targetId: cardId,
172
-        data: '{}'
180
+        data: '{}',
181
+        ...queryInfo
173 182
       }).then(res1 => {
174 183
         this.setState({
175 184
           recordId: res1.recordId

+ 4
- 5
src/pages/news/detail/index.js Vedi File

@@ -213,7 +213,7 @@ export default class NewsDetail extends Component {
213 213
   }
214 214
 
215 215
   onShareAppMessage = () => {
216
-    const { detail: { shareContents, newsName, newsId, newsImg, buildingId }, queryInfo } = this.state
216
+    const { detail: { shareContents, newsName, newsId, newsImg, buildingId } } = this.state
217 217
     const { userInfo: { person: { personId, personType, userId } } } = this.props
218 218
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
219 219
     const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
@@ -229,7 +229,6 @@ export default class NewsDetail extends Component {
229 229
       targetId: newsId,
230 230
       buildingId: buildingId || '',
231 231
       data: '{}',
232
-      ...queryInfo
233 232
     }, 'news')
234 233
 
235 234
     // addNewsShareNum(newsId)
@@ -276,7 +275,8 @@ export default class NewsDetail extends Component {
276 275
         targetId: res.newsId,
277 276
         consultantId: consultantId,
278 277
         sharePersonId: recommender,
279
-        data: '{}'
278
+        data: '{}',
279
+        ...queryInfo
280 280
       }).then(res2 => {
281 281
         this.setState({
282 282
           recordId: res2.recordId
@@ -366,7 +366,7 @@ export default class NewsDetail extends Component {
366 366
         posterVisible: !!flag
367 367
       })
368 368
     }
369
-    const { newsId, detail: { buildingId }, queryInfo } = this.state
369
+    const { newsId, detail: { buildingId } } = this.state
370 370
     shareSavePoint({
371 371
       event: 'poster',
372 372
       eventType: 'news',
@@ -374,7 +374,6 @@ export default class NewsDetail extends Component {
374 374
       targetId: newsId,
375 375
       buildingId: buildingId || '',
376 376
       data: '{}',
377
-      ...queryInfo
378 377
     }, 'news')
379 378
   }
380 379
   toProjectDetail = () => {

+ 12
- 4
src/pages/project/detail/index.js Vedi File

@@ -85,7 +85,8 @@ export default class Index extends Component {
85 85
     grantPhoneVisible: false, // 授权电话
86 86
     grantAvatarVisible: false, // 授权头像
87 87
     maskVisible: false,
88
-    extendContent: []
88
+    extendContent: [],
89
+    queryInfo: {}
89 90
   }
90 91
 
91 92
   componentWillPreload(params) {
@@ -165,7 +166,12 @@ export default class Index extends Component {
165 166
       getQrCodeParams(this.$router.params.scene).then(res => {
166 167
         console.log(res, "扫码参数")
167 168
         this.setState({
168
-          qrcodeParams: res
169
+          qrcodeParams: res,
170
+          queryInfo: {
171
+            channelId: res.channelId || '',
172
+            qrCodeId: res.qrCodeId || '',
173
+            scene: this.$router.params.scene,
174
+          }
169 175
         })
170 176
         this.initPageData(res.id)
171 177
       }).catch(err => {
@@ -286,12 +292,14 @@ export default class Index extends Component {
286 292
     const id = this.$router.params.id || sceneParams.id
287 293
     const consultantId = this.$router.params.consultantId || sceneParams.consultantId
288 294
     const recommender = this.$router.params.recommender || sceneParams.recommender
295
+    const { queryInfo } = this.state
289 296
 
290 297
     return {
291 298
       targetId: id,
292 299
       buildingId: id,
293 300
       consultantId,
294 301
       sharePersonId: recommender,
302
+      ...queryInfo
295 303
     }
296 304
   }
297 305
 
@@ -330,6 +338,7 @@ export default class Index extends Component {
330 338
     const sceneParams = this._$_scene || {}
331 339
     const buildingId = this.state.buildingId || this.$router.params.id || sceneParams.id
332 340
     const { dispatchProjectDetail } = this.props
341
+    const { queryInfo } = this.state
333 342
     this.setState({
334 343
       loaded: false,
335 344
     })
@@ -337,8 +346,7 @@ export default class Index extends Component {
337 346
       title: '正在加载数据',
338 347
       icon: 'loading'
339 348
     })
340
-
341
-    dispatchProjectDetail(buildingId).then(res => {
349
+    dispatchProjectDetail(buildingId, { ...queryInfo }).then(res => {
342 350
       const maskVisible = (res.extendContent || []).length
343 351
       this.setState({
344 352
         loaded: true,

+ 13
- 4
src/pages/project/h5Page.js Vedi File

@@ -33,7 +33,8 @@ export default class Index extends Component {
33 33
     codeParams: {}, // 解析二维码参数
34 34
     h5Id: undefined,
35 35
     reportedCustomer: false,
36
-    buildingId: undefined
36
+    buildingId: undefined,
37
+    queryInfo: {}
37 38
   };
38 39
 
39 40
   componentWillMount() {
@@ -46,7 +47,12 @@ export default class Index extends Component {
46 47
             {
47 48
               codeParams: res || {},
48 49
               h5Id: res.id,
49
-              buildingId: res.buildingId || ""
50
+              buildingId: res.buildingId || "",
51
+              queryInfo: {
52
+                channelId: res.channelId || '',
53
+                qrCodeId: res.qrCodeId || '',
54
+                scene: this.$router.params.scene,
55
+              }
50 56
             },
51 57
             () => {
52 58
               if (isEmpty(res.id)) {
@@ -149,6 +155,7 @@ export default class Index extends Component {
149 155
     const sharePersonId =
150 156
       this.$router.params.sharePersonId || codeParams.sharePersonId || "";
151 157
     const h5Id = this.state.h5Id || this.$router.params.id;
158
+    const { queryInfo } = this.state
152 159
 
153 160
     savePoint({
154 161
       event: "detail",
@@ -158,7 +165,8 @@ export default class Index extends Component {
158 165
       consultantId: consultant,
159 166
       sharePersonId: sharePersonId,
160 167
       targetId: h5Id,
161
-      data: '{"firstShare":"' + firstShare + '"}'
168
+      data: '{"firstShare":"' + firstShare + '"}',
169
+      ...queryInfo
162 170
     }).then(res => {
163 171
       this.setState({
164 172
         recordId: res.recordId
@@ -257,7 +265,8 @@ export default class Index extends Component {
257 265
 
258 266
   loadH5Profile = id => {
259 267
     // h5id 、第一个分享人ID、置业顾问ID、分享人ID
260
-    getHFiveDetail(id).then(res => {
268
+    const { queryInfo } = this.state
269
+    getHFiveDetail(id, queryInfo).then(res => {
261 270
       Taro.hideLoading();
262 271
       if (res.status == 1) {
263 272
         this.setState({

+ 1
- 1
src/services/item.js Vedi File

@@ -88,7 +88,7 @@ export const addItemShareNum = id => fetch({ url: `${API_ITEMS_SHARE}/${id}`, me
88 88
  * 直播页详情
89 89
  * @param {*} id 
90 90
  */
91
-export const queryLiveDetail = id => fetch({ url: `${API_LIVE_DEATIL}/${id}` })
91
+export const queryLiveDetail = (id, payload) => fetch({ url: `${API_LIVE_DEATIL}/${id}`, payload })
92 92
 
93 93
 /**
94 94
  * 项目详情直播列表

+ 7
- 7
src/services/user.js Vedi File

@@ -44,18 +44,18 @@ export const getVerifyList = payload => fetch({ url: API_QUERY_DOCUMENTVERIFY_li
44 44
  * 提交我的资料 (首次)
45 45
  * @param {*} payload
46 46
  */
47
-export const commitDocumentVerify = payload => fetch({ url: API_QUERY_DOCUMENTVERIFY, payload, method: 'POST'  })
47
+export const commitDocumentVerify = payload => fetch({ url: API_QUERY_DOCUMENTVERIFY, payload, method: 'POST' })
48 48
 /**
49 49
  * 提交我的资料 (非首次)
50 50
  * @param {*} payload
51 51
  */
52
-export const editDocumentVerify = payload => fetch({ url:`${API_QUERY_DOCUMENTVERIFY}/${payload.id}`, payload, method: 'PUT'  })
52
+export const editDocumentVerify = payload => fetch({ url: `${API_QUERY_DOCUMENTVERIFY}/${payload.id}`, payload, method: 'PUT' })
53 53
 
54 54
 /**
55 55
  * 获取审核资料详情
56 56
  *  * @param {*} payload
57 57
  */
58
-export const getProfileDetail = payload => fetch({ url:`${API_QUERY_DOCUMENTVERIFY}/${payload}`, payload  })
58
+export const getProfileDetail = payload => fetch({ url: `${API_QUERY_DOCUMENTVERIFY}/${payload}`, payload })
59 59
 
60 60
 /**
61 61
  * 用户签到
@@ -65,17 +65,17 @@ export const doUserSignin = payload => fetch({ url: API_USER_SIGNIN, payload, me
65 65
 
66 66
 /**
67 67
  * 获取h5中间页信息
68
- * @param {*} payload 
68
+ * @param {*} id 
69 69
  */
70
-export const getHFiveDetail = payload => fetch({ url:`${API_QUERY_TADRAINGE}/${payload}`, payload  })
70
+export const getHFiveDetail = (id, payload) => fetch({ url: `${API_QUERY_TADRAINGE}/${id}`, payload })
71 71
 /**
72 72
  * 获取首页分享信息
73 73
  * @param {*} payload
74 74
  */
75
-export const getIndexShare = payload => fetch({ url:API_TACUSTOMIMG, payload  })
75
+export const getIndexShare = payload => fetch({ url: API_TACUSTOMIMG, payload })
76 76
 /**
77 77
  * 获取积分规则
78 78
  * @param {*} payload
79 79
  */
80
-export const getPointsRule = payload => fetch({ url:API_POINTS_RULE, payload  })
80
+export const getPointsRule = payload => fetch({ url: API_POINTS_RULE, payload })
81 81