瀏覽代碼

Merge branch 'dev'

张延森 5 年之前
父節點
當前提交
c53c6aa0d4
共有 3 個檔案被更改,包括 15 行新增32 行删除
  1. 1
    3
      config/prod.js
  2. 13
    29
      src/pages/project/h5Page.js
  3. 1
    0
      src/utils/track.js

+ 1
- 3
config/prod.js 查看文件

@@ -5,13 +5,11 @@ module.exports = {
5 5
   defineConstants: {
6 6
     // HOST: '"http://192.168.2.54:8080"',
7 7
     // WSS_HOST: '"ws://192.168.2.54:8080"',
8
-    // HOST: '"https://dev.jinchengjiaye.com"',//测试
9
-    // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10 8
     // HOST: '"https://dev.pawoma.cn"',// 新测试
11 9
     // WSS_HOST: '"wss://dev.pawoma.cn"',
12 10
     HOST: '"https://lt.pawoma.cn"',
13 11
     WSS_HOST: '"wss://lt.pawoma.cn"',
14
-    Version: 'V3.5.11'
12
+    Version: 'V3.5.12'
15 13
   },
16 14
   weapp: {},
17 15
   h5: {}

+ 13
- 29
src/pages/project/h5Page.js 查看文件

@@ -30,6 +30,7 @@ export default class Index extends Component {
30 30
     codeParams: {}, // 解析二维码参数
31 31
     h5Id: undefined,
32 32
     reportedCustomer: false,
33
+    buildingId: undefined,
33 34
   }
34 35
 
35 36
   componentWillMount() {
@@ -40,7 +41,8 @@ export default class Index extends Component {
40 41
           console.log(res, "解析二维码返回值")
41 42
           this.setState({
42 43
             codeParams: res || {},
43
-            h5Id: res.id
44
+            h5Id: res.id,
45
+            buildingId: res.buildingId || '',
44 46
           }, () => {
45 47
             if (isEmpty(res.id)) {
46 48
               Taro.showModal({
@@ -130,7 +132,7 @@ export default class Index extends Component {
130 132
 
131 133
   // 埋点
132 134
   success() {
133
-    const { codeParams } = this.state
135
+    const { codeParams, buildingId } = this.state
134 136
     const firstShare = this.$router.params.firstShare || codeParams.firstShare || ""
135 137
     const consultant = this.$router.params.consultant || codeParams.consultant || ""
136 138
     const sharePersonId = this.$router.params.sharePersonId || codeParams.sharePersonId || ""
@@ -140,6 +142,7 @@ export default class Index extends Component {
140 142
       event: 'detail',
141 143
       eventType: 'h5',
142 144
       propertyName: 'h5详情',
145
+      buildingId: buildingId,
143 146
       consultantId: consultant,
144 147
       sharePersonId: sharePersonId,
145 148
       targetId: h5Id,
@@ -154,7 +157,7 @@ export default class Index extends Component {
154 157
 
155 158
   // 分享好友
156 159
   onShareAppMessage = () => {
157
-    const { pageInfo, h5Id } = this.state
160
+    const { pageInfo, h5Id, buildingId } = this.state
158 161
     const currentPage = `/${this.currentPageAndParams().join('?')}`
159 162
     const { userInfo: { person: { personId, personType, userId } } } = this.props
160 163
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
@@ -168,6 +171,7 @@ export default class Index extends Component {
168 171
       consultantId: consultantId,
169 172
       sharePersonId: personId,
170 173
       targetId: h5Id,
174
+      buildingId: buildingId,
171 175
       data: '{}'
172 176
     }, 'h5')
173 177
     // savePoint({
@@ -190,7 +194,7 @@ export default class Index extends Component {
190 194
 
191 195
   currentPageAndParams() {
192 196
     const { userInfo: { person } } = this.props
193
-    const { h5Id } = this.state
197
+    const { h5Id, buildingId } = this.state
194 198
 
195 199
     const consultantId = person.personType == ROLE_CODE['CONSULTANT'] ? person.userId : ""
196 200
     const firstShare = this.$router.params.firstShare || person.personId
@@ -202,7 +206,8 @@ export default class Index extends Component {
202 206
       `from=h5_share`,
203 207
       // `consultantId=${consultantId}`,
204 208
       `firstShare=${firstShare}`,
205
-      `id=${h5Id}`
209
+      `id=${h5Id}`,
210
+      `buildingId=${buildingId}`
206 211
     ]
207 212
 
208 213
     const res = [
@@ -228,6 +233,7 @@ export default class Index extends Component {
228 233
         this.setState({
229 234
           pageInfo: res,
230 235
           h5Id: id,
236
+          buildingId: res.buildingId || '',
231 237
         })
232 238
       } else {
233 239
         Taro.showModal({
@@ -336,29 +342,6 @@ export default class Index extends Component {
336 342
     }
337 343
   }
338 344
 
339
-  // // 报备客户
340
-  // reportClientFn() {
341
-  //   const { codeParams } = this.state
342
-  //   const consultant = this.$router.params.consultant || codeParams.consultant || ""
343
-  //   const { userInfo: { person: { phone, tel, personId, userId, personType } } } = this.props
344
-  //   // const isConsultant = personType == ROLE_CODE['CONSULTANT']
345
-  //   console.log(this.$router, "this.$routerthis报备客户哈哈哈哈")
346
-  //   console.log(this.props.userInfo.person, "person报备客户哈哈哈哈")
347
-  //   if (isConsultant && consultant != userId) {
348
-  //     const realPhone = phone || tel
349
-  //     const payload = {
350
-  //       realtyConsultant: consultant, //报备人 置业顾问
351
-  //       phone: realPhone,
352
-  //       showToast: false
353
-  //     }
354
-  //     reportClient(payload).then(res => {
355
-  //       console.log('恭喜您绑定成功')
356
-  //     }).catch(err => {
357
-  //       console.error(err)
358
-  //     })
359
-  //   }
360
-  // }
361
-
362 345
   renderMaskBanner() {
363 346
     const { avatarVisible, phoneVisible, pageInfo, h5Id } = this.state
364 347
     return (
@@ -382,7 +365,7 @@ export default class Index extends Component {
382 365
   }
383 366
   render() {
384 367
 
385
-    const { pageInfo, webViewVisible, codeParams, pageHide, h5Id } = this.state
368
+    const { pageInfo, webViewVisible, codeParams, pageHide, h5Id, buildingId } = this.state
386 369
     const { userInfo: { person } } = this.props
387 370
     const consultant = person.personType == ROLE_CODE['CONSULTANT'] ? person.userId : ""
388 371
     const firstShare = this.$router.params.firstShare || person.personId
@@ -390,6 +373,7 @@ export default class Index extends Component {
390 373
       `personId=${person.personId}`,
391 374
       `recommender=${person.personId}`,
392 375
       `h5id=${h5Id}`,
376
+      `buildingId=${buildingId}`,
393 377
       `consultant=${consultant}`,
394 378
       `firstShare=${firstShare}`,
395 379
       `codeParams=${encodeURIComponent(codeParams['__raw'])}`,

+ 1
- 0
src/utils/track.js 查看文件

@@ -29,6 +29,7 @@ export async function trackUserSource(router) {
29 29
     propertyName: pageInfo.desc,
30 30
     data: '{}',
31 31
     id: (query || {}).id,
32
+    buildingId: (query || {}).buildingId || '',
32 33
     sceneId: scene,
33 34
     sharePersonId: (query || {}).recommender,
34 35
   }