|
@@ -194,7 +194,7 @@ export default class Index extends Component {
|
194
|
194
|
}, () => {
|
195
|
195
|
this.loadDetail()
|
196
|
196
|
this.loadNewsData()
|
197
|
|
- this.loadActivityData()
|
|
197
|
+ // this.loadActivityData()
|
198
|
198
|
this.loadHelpGroupList()
|
199
|
199
|
|
200
|
200
|
addItemUv(id)
|
|
@@ -239,19 +239,22 @@ export default class Index extends Component {
|
239
|
239
|
console.log(res, "buildingId")
|
240
|
240
|
const helpList = []
|
241
|
241
|
const groupList = []
|
|
242
|
+ const activityList = []
|
242
|
243
|
res.map(item => {
|
243
|
244
|
if (item.type == 'help') {
|
244
|
245
|
helpList.push(item)
|
245
|
|
- } else {
|
|
246
|
+ } else if (item.type == 'group') {
|
246
|
247
|
groupList.push(item)
|
|
248
|
+ } else {
|
|
249
|
+ activityList.push(item)
|
247
|
250
|
}
|
248
|
251
|
})
|
249
|
252
|
this.setState({
|
250
|
253
|
helpList,
|
251
|
|
- groupList
|
|
254
|
+ groupList,
|
|
255
|
+ activityList
|
252
|
256
|
})
|
253
|
|
- }
|
254
|
|
- )
|
|
257
|
+ })
|
255
|
258
|
}
|
256
|
259
|
|
257
|
260
|
loadDetail() {
|
|
@@ -282,16 +285,16 @@ export default class Index extends Component {
|
282
|
285
|
})
|
283
|
286
|
}
|
284
|
287
|
|
285
|
|
- loadActivityData() {
|
286
|
|
- const { buildingId } = this.state
|
287
|
|
- const payload = { pageSize: 999, pageNumber: 1, buildingId }
|
288
|
|
- queryActivityList(payload).then(res => {
|
289
|
|
- console.log(res, 'Activity')
|
290
|
|
- this.setState({
|
291
|
|
- activityList: res.list || []
|
292
|
|
- })
|
293
|
|
- })
|
294
|
|
- }
|
|
288
|
+ // loadActivityData() {
|
|
289
|
+ // const { buildingId } = this.state
|
|
290
|
+ // const payload = { pageSize: 999, pageNumber: 1, buildingId }
|
|
291
|
+ // queryActivityList(payload).then(res => {
|
|
292
|
+ // console.log(res, 'Activity')
|
|
293
|
+ // this.setState({
|
|
294
|
+ // activityList: res.list || []
|
|
295
|
+ // })
|
|
296
|
+ // })
|
|
297
|
+ // }
|
295
|
298
|
|
296
|
299
|
loadNewsData() {
|
297
|
300
|
const { buildingId } = this.state
|
|
@@ -403,7 +406,6 @@ export default class Index extends Component {
|
403
|
406
|
resolve(posterData)
|
404
|
407
|
return
|
405
|
408
|
}
|
406
|
|
- con
|
407
|
409
|
const {
|
408
|
410
|
userInfo: { person: { avatarurl, nickname, personId, personType, userId }, miniApp },
|
409
|
411
|
projectDetail: { posters, buildingId, poster, price, buildingRestaurant, createDate, buildingName, tel, buildingTag, uvList = {} }
|
|
@@ -437,6 +439,7 @@ export default class Index extends Component {
|
437
|
439
|
|
438
|
440
|
// 开始生成海报
|
439
|
441
|
togglePosterStatus = (flag) => {
|
|
442
|
+ console.log(flag, "flag")
|
440
|
443
|
if (flag) {
|
441
|
444
|
// App.zhuge.track('生成海报')
|
442
|
445
|
|
|
@@ -462,22 +465,38 @@ export default class Index extends Component {
|
462
|
465
|
}
|
463
|
466
|
}
|
464
|
467
|
|
465
|
|
- makePhoneCall = () => {
|
466
|
|
- const { tel: phoneNumber } = this.props.projectDetail
|
467
|
|
- Taro.makePhoneCall({
|
468
|
|
- phoneNumber
|
469
|
|
- })
|
|
468
|
+ callPhone = () => {
|
|
469
|
+ console.log(this.props, "this.props")
|
|
470
|
+ const router = Taro.getStorageSync('router')
|
|
471
|
+ const consultant = this.$router.params.consultant || router.query.consultant
|
|
472
|
+ if (consultant) {
|
|
473
|
+ this.handleTelClick(this.state.consultData)
|
|
474
|
+ } else {
|
|
475
|
+ const { tel } = this.props.projectDetail
|
|
476
|
+ if (tel) {
|
|
477
|
+ Taro.makePhoneCall({
|
|
478
|
+ phoneNumber: tel
|
|
479
|
+ })
|
|
480
|
+ } else {
|
|
481
|
+ Taro.showToast({
|
|
482
|
+ title: '暂无联系电话',
|
|
483
|
+ icon: 'none'
|
|
484
|
+ })
|
|
485
|
+ }
|
|
486
|
+
|
|
487
|
+ }
|
|
488
|
+
|
470
|
489
|
}
|
471
|
490
|
|
472
|
491
|
handleTelClick(item, e) {
|
473
|
|
- e.stopPropagation()
|
|
492
|
+ // e.stopPropagation()
|
474
|
493
|
Taro.makePhoneCall({
|
475
|
|
- phoneNumber: item.phone
|
|
494
|
+ phoneNumber: item.phone || item.tel
|
476
|
495
|
})
|
477
|
496
|
}
|
478
|
497
|
|
479
|
498
|
handleChatClick(item, e) {
|
480
|
|
- e.stopPropagation()
|
|
499
|
+ // e.stopPropagation()
|
481
|
500
|
const { userInfo: { person: { personId, nickname, name } } } = this.props
|
482
|
501
|
const { userInfo: { miniApp: { tpls } } } = this.props
|
483
|
502
|
const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_NOTICE && x.isSubscribe == true))[0].tplId
|
|
@@ -506,11 +525,20 @@ export default class Index extends Component {
|
506
|
525
|
}
|
507
|
526
|
|
508
|
527
|
handleMoreClick() {
|
509
|
|
- const { userInfo: { miniApp: { tpls } } } = this.props
|
|
528
|
+
|
510
|
529
|
Taro.navigateTo({
|
511
|
530
|
url: `/pages/card/list/index?buildingId=${this.state.buildingId}`
|
512
|
531
|
})
|
513
|
532
|
}
|
|
533
|
+ ChatOnlineClick() {
|
|
534
|
+ const router = Taro.getStorageSync('router')
|
|
535
|
+ const consultant = this.$router.params.consultant || router.query.consultant
|
|
536
|
+ if (consultant) {
|
|
537
|
+ this.handleChatClick(this.state.consultData)
|
|
538
|
+ } else {
|
|
539
|
+ this.handleMoreClick()
|
|
540
|
+ }
|
|
541
|
+ }
|
514
|
542
|
|
515
|
543
|
handleStopPropagation(e) {
|
516
|
544
|
e.stopPropagation()
|
|
@@ -564,7 +592,7 @@ export default class Index extends Component {
|
564
|
592
|
|
565
|
593
|
handActivityItemClick(item) {
|
566
|
594
|
Taro.navigateTo({
|
567
|
|
- url: '/pages/activity/detail/index?id=' + item.dynamicId
|
|
595
|
+ url: '/pages/activity/detail/index?id=' + item.activityId
|
568
|
596
|
})
|
569
|
597
|
}
|
570
|
598
|
|
|
@@ -652,10 +680,10 @@ export default class Index extends Component {
|
652
|
680
|
}
|
653
|
681
|
|
654
|
682
|
</View>
|
655
|
|
- <Button className='bt-nav__item bt-nav__right' onClick={this.handleMoreClick}>
|
|
683
|
+ <Button className='bt-nav__item bt-nav__right' onClick={this.ChatOnlineClick}>
|
656
|
684
|
<Text className="text">在线聊</Text>
|
657
|
685
|
</Button>
|
658
|
|
- <Button className='bt-nav__item bt-nav__right bt-nav__right2' onClick={this.makePhoneCall}>
|
|
686
|
+ <Button className='bt-nav__item bt-nav__right bt-nav__right2' onClick={this.callPhone}>
|
659
|
687
|
<Text className="iconfont icon-tel"></Text>
|
660
|
688
|
<Text className="text">打电话</Text>
|
661
|
689
|
</Button>
|
|
@@ -812,7 +840,7 @@ export default class Index extends Component {
|
812
|
840
|
<Text className="section-head__title">位置及周边配套</Text>
|
813
|
841
|
</View> */}
|
814
|
842
|
</View>
|
815
|
|
- <Around building={building} buildingId={this.state.buildingId} ></Around>
|
|
843
|
+ <Around building={building} buildingId={this.state.buildingId} ></Around>
|
816
|
844
|
</View>
|
817
|
845
|
)
|
818
|
846
|
}
|
|
@@ -935,7 +963,6 @@ export default class Index extends Component {
|
935
|
963
|
<Block>
|
936
|
964
|
{groupList.length > 0 &&
|
937
|
965
|
<View className="activity">
|
938
|
|
- {console.log(groupList, '----groupList-----')}
|
939
|
966
|
<View className="title">拼团活动</View>
|
940
|
967
|
<View
|
941
|
968
|
style={{ position: 'relative' }}>
|