|
@@ -58,7 +58,7 @@ export default class Index extends Component {
|
58
|
58
|
videoPlayShow: 'flex',
|
59
|
59
|
}
|
60
|
60
|
|
61
|
|
- componentWillMount() {
|
|
61
|
+ componentWillMount () {
|
62
|
62
|
// const { id = '78c3dd489791dc1d29472fa344b08c45' } = this.$router.params
|
63
|
63
|
|
64
|
64
|
ready.queue(() => {
|
|
@@ -92,12 +92,12 @@ export default class Index extends Component {
|
92
|
92
|
})
|
93
|
93
|
}
|
94
|
94
|
|
95
|
|
- componentWillUnmount() {
|
|
95
|
+ componentWillUnmount () {
|
96
|
96
|
const { recordId } = this.state
|
97
|
97
|
recordId && updatePoint(recordId)
|
98
|
98
|
}
|
99
|
99
|
|
100
|
|
- loadHelpGroupList() {
|
|
100
|
+ loadHelpGroupList () {
|
101
|
101
|
const { buildingId } = this.state
|
102
|
102
|
|
103
|
103
|
queryHelpGroup({ buildingId: buildingId }).then(res => {
|
|
@@ -119,7 +119,7 @@ export default class Index extends Component {
|
119
|
119
|
)
|
120
|
120
|
}
|
121
|
121
|
|
122
|
|
- loadDetail() {
|
|
122
|
+ loadDetail () {
|
123
|
123
|
const { buildingId } = this.state
|
124
|
124
|
const { dispatchProjectDetail } = this.props
|
125
|
125
|
this.setState({
|
|
@@ -147,7 +147,7 @@ export default class Index extends Component {
|
147
|
147
|
})
|
148
|
148
|
}
|
149
|
149
|
|
150
|
|
- loadActivityData() {
|
|
150
|
+ loadActivityData () {
|
151
|
151
|
const { buildingId } = this.state
|
152
|
152
|
const payload = { pageSize: 999, pageNumber: 1, buildingId }
|
153
|
153
|
queryActivityList(payload).then(res => {
|
|
@@ -157,7 +157,7 @@ export default class Index extends Component {
|
157
|
157
|
})
|
158
|
158
|
}
|
159
|
159
|
|
160
|
|
- loadNewsData() {
|
|
160
|
+ loadNewsData () {
|
161
|
161
|
const { buildingId } = this.state
|
162
|
162
|
const payload = { pageSize: 2, pageNumber: 1, buildingId }
|
163
|
163
|
queryNewsList(payload).then(res => {
|
|
@@ -167,11 +167,11 @@ export default class Index extends Component {
|
167
|
167
|
})
|
168
|
168
|
}
|
169
|
169
|
|
170
|
|
- navigateTo(url) {
|
|
170
|
+ navigateTo (url) {
|
171
|
171
|
Taro.navigateTo({ url: url })
|
172
|
172
|
}
|
173
|
173
|
// 海报预览图
|
174
|
|
- previewImage(arr) {
|
|
174
|
+ previewImage (arr) {
|
175
|
175
|
// console.log('arr:' + arr)
|
176
|
176
|
if (arr[0].length > 1) {
|
177
|
177
|
Taro.previewImage({
|
|
@@ -198,7 +198,7 @@ export default class Index extends Component {
|
198
|
198
|
})
|
199
|
199
|
}
|
200
|
200
|
|
201
|
|
- openMap() {
|
|
201
|
+ openMap () {
|
202
|
202
|
const {
|
203
|
203
|
buildingName,
|
204
|
204
|
address,
|
|
@@ -225,12 +225,12 @@ export default class Index extends Component {
|
225
|
225
|
})
|
226
|
226
|
}
|
227
|
227
|
|
228
|
|
- toViewAlbum() {
|
|
228
|
+ toViewAlbum () {
|
229
|
229
|
const { buildingId } = this.state
|
230
|
230
|
this.navigateTo(`/pages/project/album/index?id=${buildingId}`)
|
231
|
231
|
}
|
232
|
232
|
|
233
|
|
- onViewFans() {
|
|
233
|
+ onViewFans () {
|
234
|
234
|
const { buildingId } = this.state
|
235
|
235
|
this.navigateTo('/pages/card/fans/index?type=item&id=' + buildingId)
|
236
|
236
|
}
|
|
@@ -259,7 +259,7 @@ export default class Index extends Component {
|
259
|
259
|
}
|
260
|
260
|
}
|
261
|
261
|
|
262
|
|
- getPhoneNumber(e, item) {
|
|
262
|
+ getPhoneNumber (e, item) {
|
263
|
263
|
getUserPhone(e, (phoneNumber) => {
|
264
|
264
|
const { userInfo: { person: { personId, nickname, name } } } = this.props
|
265
|
265
|
Taro.navigateTo({
|
|
@@ -268,7 +268,7 @@ export default class Index extends Component {
|
268
|
268
|
})
|
269
|
269
|
}
|
270
|
270
|
|
271
|
|
- getPosterData() {
|
|
271
|
+ getPosterData () {
|
272
|
272
|
return new Promise(resolve => {
|
273
|
273
|
const { posterData } = this.state
|
274
|
274
|
if (posterData.qrcode) {
|
|
@@ -339,14 +339,14 @@ export default class Index extends Component {
|
339
|
339
|
})
|
340
|
340
|
}
|
341
|
341
|
|
342
|
|
- handleTelClick(item, e) {
|
|
342
|
+ handleTelClick (item, e) {
|
343
|
343
|
e.stopPropagation()
|
344
|
344
|
Taro.makePhoneCall({
|
345
|
345
|
phoneNumber: item.phone
|
346
|
346
|
})
|
347
|
347
|
}
|
348
|
348
|
|
349
|
|
- handleChatClick(item, e) {
|
|
349
|
+ handleChatClick (item, e) {
|
350
|
350
|
e.stopPropagation()
|
351
|
351
|
const { userInfo: { person: { personId, nickname, name } } } = this.props
|
352
|
352
|
Taro.navigateTo({
|
|
@@ -354,24 +354,24 @@ export default class Index extends Component {
|
354
|
354
|
})
|
355
|
355
|
}
|
356
|
356
|
|
357
|
|
- handleConsuItemClick(item) {
|
|
357
|
+ handleConsuItemClick (item) {
|
358
|
358
|
Taro.navigateTo({
|
359
|
359
|
url: `/pages/card/index?id=${item.id}`
|
360
|
360
|
})
|
361
|
361
|
}
|
362
|
362
|
|
363
|
|
- handleMoreClick() {
|
|
363
|
+ handleMoreClick () {
|
364
|
364
|
// App.zhuge.track('查看置业顾问列表')
|
365
|
365
|
Taro.navigateTo({
|
366
|
366
|
url: `/pages/card/list/index?buildingId=${this.state.buildingId}`
|
367
|
367
|
})
|
368
|
368
|
}
|
369
|
369
|
|
370
|
|
- handleStopPropagation(e) {
|
|
370
|
+ handleStopPropagation (e) {
|
371
|
371
|
e.stopPropagation()
|
372
|
372
|
}
|
373
|
373
|
|
374
|
|
- toRecomonedPage() {
|
|
374
|
+ toRecomonedPage () {
|
375
|
375
|
const {
|
376
|
376
|
userInfo: { person: { personType } }
|
377
|
377
|
} = this.props
|
|
@@ -387,50 +387,50 @@ export default class Index extends Component {
|
387
|
387
|
}
|
388
|
388
|
}
|
389
|
389
|
|
390
|
|
- toHome() {
|
|
390
|
+ toHome () {
|
391
|
391
|
Taro.switchTab({
|
392
|
392
|
url: `/pages/project/index`
|
393
|
393
|
})
|
394
|
394
|
}
|
395
|
395
|
|
396
|
|
- HandleCircumTabClick(id) {
|
|
396
|
+ HandleCircumTabClick (id) {
|
397
|
397
|
this.setState({
|
398
|
398
|
curTab: id
|
399
|
399
|
})
|
400
|
400
|
}
|
401
|
401
|
|
402
|
|
- handleNewsMoreClick() {
|
|
402
|
+ handleNewsMoreClick () {
|
403
|
403
|
Taro.navigateTo({
|
404
|
404
|
url: `/pages/news/index?buildingId=` + this.state.buildingId
|
405
|
405
|
})
|
406
|
406
|
}
|
407
|
407
|
|
408
|
|
- handNewsItemClick(id) {
|
|
408
|
+ handNewsItemClick (id) {
|
409
|
409
|
Taro.navigateTo({
|
410
|
410
|
url: '/pages/news/detail/index?id=' + id
|
411
|
411
|
})
|
412
|
412
|
}
|
413
|
413
|
|
414
|
|
- handleActivityMoreClick() {
|
|
414
|
+ handleActivityMoreClick () {
|
415
|
415
|
Taro.navigateTo({
|
416
|
416
|
url: `/pages/activity/index?buildingId=` + this.state.buildingId
|
417
|
417
|
})
|
418
|
418
|
}
|
419
|
419
|
|
420
|
|
- handActivityItemClick(id) {
|
|
420
|
+ handActivityItemClick (id) {
|
421
|
421
|
Taro.navigateTo({
|
422
|
422
|
url: '/pages/activity/detail/index?id=' + id
|
423
|
423
|
})
|
424
|
424
|
}
|
425
|
425
|
|
426
|
|
- handlePreviewHxImage(current, urls) {
|
|
426
|
+ handlePreviewHxImage (current, urls) {
|
427
|
427
|
Taro.previewImage({
|
428
|
428
|
current,
|
429
|
429
|
urls
|
430
|
430
|
})
|
431
|
431
|
}
|
432
|
432
|
|
433
|
|
- handleFavor() {
|
|
433
|
+ handleFavor () {
|
434
|
434
|
const { buildingId, isSaved } = this.state
|
435
|
435
|
if (isSaved) {
|
436
|
436
|
cancelFavorProject(buildingId).then(res => {
|
|
@@ -460,18 +460,18 @@ export default class Index extends Component {
|
460
|
460
|
console.log('活动项目收藏')
|
461
|
461
|
})
|
462
|
462
|
}
|
463
|
|
- handleToolsClick() {
|
|
463
|
+ handleToolsClick () {
|
464
|
464
|
Taro.navigateTo({
|
465
|
465
|
url: `/pages/toolKit/index`
|
466
|
466
|
})
|
467
|
467
|
}
|
468
|
|
- moreFloor() {
|
|
468
|
+ moreFloor () {
|
469
|
469
|
Taro.navigateTo({
|
470
|
470
|
url: `/pages/project/floor/index`
|
471
|
471
|
})
|
472
|
472
|
}
|
473
|
473
|
|
474
|
|
- renderBottomMenu() {
|
|
474
|
+ renderBottomMenu () {
|
475
|
475
|
const { userInfo: { person: { personType } } } = this.props
|
476
|
476
|
const { posterShow } = this.state
|
477
|
477
|
return (
|
|
@@ -506,14 +506,14 @@ export default class Index extends Component {
|
506
|
506
|
)
|
507
|
507
|
}
|
508
|
508
|
|
509
|
|
- previewHouseImage(current, urls) {
|
|
509
|
+ previewHouseImage (current, urls) {
|
510
|
510
|
Taro.previewImage({
|
511
|
511
|
current,
|
512
|
512
|
urls
|
513
|
513
|
})
|
514
|
514
|
}
|
515
|
515
|
|
516
|
|
- renderBuildingProjectTypeList() {
|
|
516
|
+ renderBuildingProjectTypeList () {
|
517
|
517
|
const { statusOpts } = this.state
|
518
|
518
|
const { projectDetail: { buildingProjectType = [], status, marketStatus } } = this.props
|
519
|
519
|
return (
|
|
@@ -573,22 +573,22 @@ export default class Index extends Component {
|
573
|
573
|
}
|
574
|
574
|
|
575
|
575
|
|
576
|
|
- renderPhotoAlbum() {
|
|
576
|
+ renderPhotoAlbum () {
|
577
|
577
|
const { projectDetail: { buildingApartment } } = this.props
|
578
|
578
|
const list = buildingApartment.filter(item => item.apartmentType === 'photo')
|
579
|
|
- const imgList = list.reduce((prev, cur) => {
|
580
|
|
- prev = prev.concat(cur.buildingImgList)
|
581
|
|
- return prev
|
582
|
|
- }, [])
|
|
579
|
+ // const imgList = list.reduce((prev, cur) => {
|
|
580
|
+ // prev = prev.concat(cur.buildingImgList)
|
|
581
|
+ // return prev
|
|
582
|
+ // }, [])
|
|
583
|
+
|
583
|
584
|
|
584
|
|
- const { albumCurrent } = this.state
|
585
|
585
|
|
586
|
586
|
|
587
|
587
|
|
588
|
588
|
return (
|
589
|
589
|
|
590
|
590
|
|
591
|
|
- <Block>
|
|
591
|
+ <Block> {console.log(list, 'list')}
|
592
|
592
|
{list.length > 0 &&
|
593
|
593
|
(
|
594
|
594
|
<View className='photos__type'>
|
|
@@ -598,22 +598,32 @@ export default class Index extends Component {
|
598
|
598
|
|
599
|
599
|
<View className="around-tab">
|
600
|
600
|
{list.map((item, index) => {
|
601
|
|
- const { apartmentName } = item || {}
|
602
|
|
- const buildingImgList = item.buildingImgList
|
603
|
|
-
|
604
|
|
-
|
605
|
|
- return (
|
606
|
|
- <View
|
607
|
|
- style={{ marginRight: '8px' }}
|
608
|
|
- >
|
609
|
|
- {/* {`${label}(${num})`} */}
|
610
|
|
- <View>
|
611
|
|
- <Image className='albumimg' src={getThumbnail(buildingImgList[0].url)} ></Image>
|
612
|
|
- <View style={{ textAlign: 'center' }}> {`${apartmentName}(${buildingImgList.length})`} </View>
|
613
|
|
- </View>
|
614
|
|
- </View>
|
615
|
|
- )
|
616
|
|
- })}
|
|
601
|
+ const { apartmentName } = item
|
|
602
|
+ const buildingImgList = item.buildingImgList
|
|
603
|
+ const buildingImgUrl = buildingImgList.length > 0 ? buildingImgList[0].url : null
|
|
604
|
+
|
|
605
|
+ console.log(buildingImgUrl, 'buildingImgUrl')
|
|
606
|
+
|
|
607
|
+ // if (buildingImgUrl != null) {
|
|
608
|
+ return (<View>
|
|
609
|
+ {buildingImgUrl != null&& (<View
|
|
610
|
+ style={{ marginRight: '8px' }}
|
|
611
|
+ >
|
|
612
|
+
|
|
613
|
+ <View>
|
|
614
|
+ <Image className='albumimg' src={getThumbnail(buildingImgList[0].url)} ></Image>
|
|
615
|
+ <View style={{ textAlign: 'center', width: '218rpx', display: 'flex' }}>
|
|
616
|
+ <View style={{ textAlign: 'center', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}> {apartmentName} </View>
|
|
617
|
+
|
|
618
|
+ <View>({buildingImgList.length})</View>
|
|
619
|
+ </View>
|
|
620
|
+ </View>
|
|
621
|
+ </View>)}</View>
|
|
622
|
+ )
|
|
623
|
+ // }
|
|
624
|
+
|
|
625
|
+ })
|
|
626
|
+ }
|
617
|
627
|
</View>
|
618
|
628
|
</View>
|
619
|
629
|
</ScrollView>
|
|
@@ -623,7 +633,7 @@ export default class Index extends Component {
|
623
|
633
|
</Block>
|
624
|
634
|
)
|
625
|
635
|
}
|
626
|
|
- rendercircum() {
|
|
636
|
+ rendercircum () {
|
627
|
637
|
const building = {
|
628
|
638
|
...this.props.projectDetail
|
629
|
639
|
}
|
|
@@ -640,7 +650,7 @@ export default class Index extends Component {
|
640
|
650
|
)
|
641
|
651
|
}
|
642
|
652
|
|
643
|
|
- renderConsuler() {
|
|
653
|
+ renderConsuler () {
|
644
|
654
|
const { userInfo: { person: { phone } } } = this.props
|
645
|
655
|
const { projectDetail: { consultants = [] } } = this.props
|
646
|
656
|
return (
|
|
@@ -694,7 +704,7 @@ export default class Index extends Component {
|
694
|
704
|
)
|
695
|
705
|
}
|
696
|
706
|
|
697
|
|
- renderStatement() {
|
|
707
|
+ renderStatement () {
|
698
|
708
|
return (
|
699
|
709
|
<View className='statement'>
|
700
|
710
|
免责条款:以上价格仅供参考,具体一房一价的信息以售楼处展示为准。本网显示房屋位置、交通、医疗、教育、商业等配套信息,来源于第三方网络数据,不作为要约,仅供参考,双方具体权利义务应以法律规定及买卖合同约定为准。<br></br>本平台对项目周边文化教育的介绍旨在提供相关信息,并不意味着信息发布方对就学安排作出承诺。相关教育资源就学信息存在调整的可能,应以政府教育主管部门及办学颁布的政策规定为准。
|
|
@@ -703,7 +713,7 @@ export default class Index extends Component {
|
703
|
713
|
}
|
704
|
714
|
|
705
|
715
|
|
706
|
|
- renderHelp() {
|
|
716
|
+ renderHelp () {
|
707
|
717
|
const { helpList } = this.state
|
708
|
718
|
return (
|
709
|
719
|
<Block>
|
|
@@ -724,17 +734,17 @@ export default class Index extends Component {
|
724
|
734
|
)
|
725
|
735
|
}
|
726
|
736
|
|
727
|
|
- handleHelpClick(item) {
|
|
737
|
+ handleHelpClick (item) {
|
728
|
738
|
Taro.navigateTo({
|
729
|
739
|
url: '/pages/activity/detail/assistance?id=' + item.activityId
|
730
|
740
|
})
|
731
|
741
|
}
|
732
|
|
- handleGroupClick(item) {
|
|
742
|
+ handleGroupClick (item) {
|
733
|
743
|
Taro.navigateTo({
|
734
|
744
|
url: '/pages/activity/detail/assemble?id=' + item.activityId
|
735
|
745
|
})
|
736
|
746
|
}
|
737
|
|
- renderGroup() {
|
|
747
|
+ renderGroup () {
|
738
|
748
|
const { groupList } = this.state
|
739
|
749
|
return (
|
740
|
750
|
<Block>
|
|
@@ -757,7 +767,7 @@ export default class Index extends Component {
|
757
|
767
|
)
|
758
|
768
|
}
|
759
|
769
|
|
760
|
|
- renderHouseTypeList() {
|
|
770
|
+ renderHouseTypeList () {
|
761
|
771
|
const { statusOpts } = this.state
|
762
|
772
|
const { projectDetail: { buildingApartment } } = this.props
|
763
|
773
|
const list = buildingApartment.filter(item => item.apartmentType === 'apart')
|
|
@@ -874,7 +884,7 @@ export default class Index extends Component {
|
874
|
884
|
</Block>
|
875
|
885
|
)
|
876
|
886
|
}
|
877
|
|
- renderNews() {
|
|
887
|
+ renderNews () {
|
878
|
888
|
const { newsList } = this.state
|
879
|
889
|
return (
|
880
|
890
|
<Block>
|
|
@@ -915,21 +925,21 @@ export default class Index extends Component {
|
915
|
925
|
videoContext.play()
|
916
|
926
|
}
|
917
|
927
|
|
918
|
|
- onPlay() {
|
919
|
|
- console.log()
|
920
|
|
- this.setState({
|
921
|
|
- videoPlayShow: 'none'
|
922
|
|
- })
|
923
|
|
- }
|
|
928
|
+ // onPlay () {
|
|
929
|
+ // console.log()
|
|
930
|
+ // this.setState({
|
|
931
|
+ // videoPlayShow: 'none'
|
|
932
|
+ // })
|
|
933
|
+ // }
|
924
|
934
|
|
925
|
|
- onPause() {
|
926
|
|
- this.setState({
|
927
|
|
- videoPlayShow: 'flex'
|
928
|
|
- })
|
929
|
|
- }
|
|
935
|
+ // onPause() {
|
|
936
|
+ // this.setState({
|
|
937
|
+ // videoPlayShow: 'flex'
|
|
938
|
+ // })
|
|
939
|
+ // }
|
930
|
940
|
|
931
|
941
|
|
932
|
|
- renderVideo() {
|
|
942
|
+ renderVideo () {
|
933
|
943
|
const { videoPlayShow } = this.state
|
934
|
944
|
const { projectDetail } = this.props
|
935
|
945
|
const { videoImage } = projectDetail
|
|
@@ -978,13 +988,13 @@ export default class Index extends Component {
|
978
|
988
|
)
|
979
|
989
|
}
|
980
|
990
|
|
981
|
|
- changeCurrent(current) {
|
|
991
|
+ changeCurrent (current) {
|
982
|
992
|
this.setState({
|
983
|
993
|
current: current + 1
|
984
|
994
|
})
|
985
|
995
|
}
|
986
|
996
|
|
987
|
|
- render() {
|
|
997
|
+ render () {
|
988
|
998
|
const { posterStatus, posterData, loaded, btnstate } = this.state
|
989
|
999
|
const { projectDetail } = this.props
|
990
|
1000
|
const { uvList = {} } = projectDetail
|