|
@@ -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'])}`,
|