|
@@ -48,6 +48,7 @@ export default class Index extends Component {
|
48
|
48
|
helpList: [],
|
49
|
49
|
groupList: [],
|
50
|
50
|
statusOpts: ['待定', '售罄', '在售'],
|
|
51
|
+ statusBgColors: ['#F6B61D', '#BB9C79', '#CECECE'],
|
51
|
52
|
// circumOpts: [],
|
52
|
53
|
curTab: 'Transport',
|
53
|
54
|
recordId: null,
|
|
@@ -58,7 +59,7 @@ export default class Index extends Component {
|
58
|
59
|
videoPlayShow: 'flex',
|
59
|
60
|
}
|
60
|
61
|
|
61
|
|
- componentWillMount () {
|
|
62
|
+ componentWillMount() {
|
62
|
63
|
// const { id = '78c3dd489791dc1d29472fa344b08c45' } = this.$router.params
|
63
|
64
|
|
64
|
65
|
ready.queue(() => {
|
|
@@ -92,12 +93,17 @@ export default class Index extends Component {
|
92
|
93
|
})
|
93
|
94
|
}
|
94
|
95
|
|
95
|
|
- componentWillUnmount () {
|
|
96
|
+ componentWillUnmount() {
|
96
|
97
|
const { recordId } = this.state
|
97
|
98
|
recordId && updatePoint(recordId)
|
98
|
99
|
}
|
|
100
|
+ componentDidMount() {
|
|
101
|
+ const options = wx.getLaunchOptionsSync()
|
|
102
|
+ console.log(options, "-------------options---------")
|
|
103
|
+ // if()
|
|
104
|
+ }
|
99
|
105
|
|
100
|
|
- loadHelpGroupList () {
|
|
106
|
+ loadHelpGroupList() {
|
101
|
107
|
const { buildingId } = this.state
|
102
|
108
|
|
103
|
109
|
queryHelpGroup({ buildingId: buildingId }).then(res => {
|
|
@@ -119,7 +125,7 @@ export default class Index extends Component {
|
119
|
125
|
)
|
120
|
126
|
}
|
121
|
127
|
|
122
|
|
- loadDetail () {
|
|
128
|
+ loadDetail() {
|
123
|
129
|
const { buildingId } = this.state
|
124
|
130
|
const { dispatchProjectDetail } = this.props
|
125
|
131
|
this.setState({
|
|
@@ -147,7 +153,7 @@ export default class Index extends Component {
|
147
|
153
|
})
|
148
|
154
|
}
|
149
|
155
|
|
150
|
|
- loadActivityData () {
|
|
156
|
+ loadActivityData() {
|
151
|
157
|
const { buildingId } = this.state
|
152
|
158
|
const payload = { pageSize: 999, pageNumber: 1, buildingId }
|
153
|
159
|
queryActivityList(payload).then(res => {
|
|
@@ -158,7 +164,7 @@ export default class Index extends Component {
|
158
|
164
|
})
|
159
|
165
|
}
|
160
|
166
|
|
161
|
|
- loadNewsData () {
|
|
167
|
+ loadNewsData() {
|
162
|
168
|
const { buildingId } = this.state
|
163
|
169
|
const payload = { pageSize: 2, pageNumber: 1, buildingId }
|
164
|
170
|
queryNewsList(payload).then(res => {
|
|
@@ -168,11 +174,11 @@ export default class Index extends Component {
|
168
|
174
|
})
|
169
|
175
|
}
|
170
|
176
|
|
171
|
|
- navigateTo (url) {
|
|
177
|
+ navigateTo(url) {
|
172
|
178
|
Taro.navigateTo({ url: url })
|
173
|
179
|
}
|
174
|
180
|
// 海报预览图
|
175
|
|
- previewImage (arr) {
|
|
181
|
+ previewImage(arr) {
|
176
|
182
|
// console.log('arr:' + arr)
|
177
|
183
|
if (arr[0].length > 1) {
|
178
|
184
|
Taro.previewImage({
|
|
@@ -199,7 +205,7 @@ export default class Index extends Component {
|
199
|
205
|
})
|
200
|
206
|
}
|
201
|
207
|
|
202
|
|
- openMap () {
|
|
208
|
+ openMap() {
|
203
|
209
|
const {
|
204
|
210
|
buildingName,
|
205
|
211
|
address,
|
|
@@ -226,12 +232,12 @@ export default class Index extends Component {
|
226
|
232
|
})
|
227
|
233
|
}
|
228
|
234
|
|
229
|
|
- toViewAlbum () {
|
|
235
|
+ toViewAlbum() {
|
230
|
236
|
const { buildingId } = this.state
|
231
|
237
|
this.navigateTo(`/pages/project/album/index?id=${buildingId}`)
|
232
|
238
|
}
|
233
|
239
|
|
234
|
|
- onViewFans () {
|
|
240
|
+ onViewFans() {
|
235
|
241
|
const { buildingId } = this.state
|
236
|
242
|
this.navigateTo('/pages/card/fans/index?type=item&id=' + buildingId)
|
237
|
243
|
}
|
|
@@ -260,7 +266,7 @@ export default class Index extends Component {
|
260
|
266
|
}
|
261
|
267
|
}
|
262
|
268
|
|
263
|
|
- getPhoneNumber (e, item) {
|
|
269
|
+ getPhoneNumber(e, item) {
|
264
|
270
|
getUserPhone(e, (phoneNumber) => {
|
265
|
271
|
const { userInfo: { person: { personId, nickname, name } } } = this.props
|
266
|
272
|
Taro.navigateTo({
|
|
@@ -269,7 +275,7 @@ export default class Index extends Component {
|
269
|
275
|
})
|
270
|
276
|
}
|
271
|
277
|
|
272
|
|
- getPosterData () {
|
|
278
|
+ getPosterData() {
|
273
|
279
|
return new Promise(resolve => {
|
274
|
280
|
const { posterData } = this.state
|
275
|
281
|
if (posterData.qrcode) {
|
|
@@ -340,14 +346,14 @@ export default class Index extends Component {
|
340
|
346
|
})
|
341
|
347
|
}
|
342
|
348
|
|
343
|
|
- handleTelClick (item, e) {
|
|
349
|
+ handleTelClick(item, e) {
|
344
|
350
|
e.stopPropagation()
|
345
|
351
|
Taro.makePhoneCall({
|
346
|
352
|
phoneNumber: item.phone
|
347
|
353
|
})
|
348
|
354
|
}
|
349
|
355
|
|
350
|
|
- handleChatClick (item, e) {
|
|
356
|
+ handleChatClick(item, e) {
|
351
|
357
|
e.stopPropagation()
|
352
|
358
|
const { userInfo: { person: { personId, nickname, name } } } = this.props
|
353
|
359
|
Taro.navigateTo({
|
|
@@ -355,24 +361,24 @@ export default class Index extends Component {
|
355
|
361
|
})
|
356
|
362
|
}
|
357
|
363
|
|
358
|
|
- handleConsuItemClick (item) {
|
|
364
|
+ handleConsuItemClick(item) {
|
359
|
365
|
Taro.navigateTo({
|
360
|
366
|
url: `/pages/card/index?id=${item.id}`
|
361
|
367
|
})
|
362
|
368
|
}
|
363
|
369
|
|
364
|
|
- handleMoreClick () {
|
|
370
|
+ handleMoreClick() {
|
365
|
371
|
// App.zhuge.track('查看置业顾问列表')
|
366
|
372
|
Taro.navigateTo({
|
367
|
373
|
url: `/pages/card/list/index?buildingId=${this.state.buildingId}`
|
368
|
374
|
})
|
369
|
375
|
}
|
370
|
376
|
|
371
|
|
- handleStopPropagation (e) {
|
|
377
|
+ handleStopPropagation(e) {
|
372
|
378
|
e.stopPropagation()
|
373
|
379
|
}
|
374
|
380
|
|
375
|
|
- toRecomonedPage () {
|
|
381
|
+ toRecomonedPage() {
|
376
|
382
|
const {
|
377
|
383
|
userInfo: { person: { personType } }
|
378
|
384
|
} = this.props
|
|
@@ -388,50 +394,50 @@ export default class Index extends Component {
|
388
|
394
|
}
|
389
|
395
|
}
|
390
|
396
|
|
391
|
|
- toHome () {
|
|
397
|
+ toHome() {
|
392
|
398
|
Taro.switchTab({
|
393
|
399
|
url: `/pages/project/index`
|
394
|
400
|
})
|
395
|
401
|
}
|
396
|
402
|
|
397
|
|
- HandleCircumTabClick (id) {
|
|
403
|
+ HandleCircumTabClick(id) {
|
398
|
404
|
this.setState({
|
399
|
405
|
curTab: id
|
400
|
406
|
})
|
401
|
407
|
}
|
402
|
408
|
|
403
|
|
- handleNewsMoreClick () {
|
|
409
|
+ handleNewsMoreClick() {
|
404
|
410
|
Taro.navigateTo({
|
405
|
411
|
url: `/pages/news/index?buildingId=` + this.state.buildingId
|
406
|
412
|
})
|
407
|
413
|
}
|
408
|
414
|
|
409
|
|
- handNewsItemClick (id) {
|
|
415
|
+ handNewsItemClick(id) {
|
410
|
416
|
Taro.navigateTo({
|
411
|
417
|
url: '/pages/news/detail/index?id=' + id
|
412
|
418
|
})
|
413
|
419
|
}
|
414
|
420
|
|
415
|
|
- handleActivityMoreClick () {
|
|
421
|
+ handleActivityMoreClick() {
|
416
|
422
|
Taro.navigateTo({
|
417
|
423
|
url: `/pages/activity/index?buildingId=` + this.state.buildingId
|
418
|
424
|
})
|
419
|
425
|
}
|
420
|
426
|
|
421
|
|
- handActivityItemClick (item) {
|
|
427
|
+ handActivityItemClick(item) {
|
422
|
428
|
Taro.navigateTo({
|
423
|
429
|
url: '/pages/activity/detail/index?id=' + item.dynamicId
|
424
|
430
|
})
|
425
|
431
|
}
|
426
|
432
|
|
427
|
|
- handlePreviewHxImage (current, urls) {
|
|
433
|
+ handlePreviewHxImage(current, urls) {
|
428
|
434
|
Taro.previewImage({
|
429
|
435
|
current,
|
430
|
436
|
urls
|
431
|
437
|
})
|
432
|
438
|
}
|
433
|
439
|
|
434
|
|
- handleFavor () {
|
|
440
|
+ handleFavor() {
|
435
|
441
|
const { buildingId, isSaved } = this.state
|
436
|
442
|
if (isSaved) {
|
437
|
443
|
cancelFavorProject(buildingId).then(res => {
|
|
@@ -461,18 +467,18 @@ export default class Index extends Component {
|
461
|
467
|
console.log('活动项目收藏')
|
462
|
468
|
})
|
463
|
469
|
}
|
464
|
|
- handleToolsClick () {
|
|
470
|
+ handleToolsClick() {
|
465
|
471
|
Taro.navigateTo({
|
466
|
472
|
url: `/pages/toolKit/index`
|
467
|
473
|
})
|
468
|
474
|
}
|
469
|
|
- moreFloor () {
|
|
475
|
+ moreFloor() {
|
470
|
476
|
Taro.navigateTo({
|
471
|
477
|
url: `/pages/project/floor/index`
|
472
|
478
|
})
|
473
|
479
|
}
|
474
|
480
|
|
475
|
|
- renderBottomMenu () {
|
|
481
|
+ renderBottomMenu() {
|
476
|
482
|
const { userInfo: { person: { personType } } } = this.props
|
477
|
483
|
const { posterShow } = this.state
|
478
|
484
|
return (
|
|
@@ -507,14 +513,14 @@ export default class Index extends Component {
|
507
|
513
|
)
|
508
|
514
|
}
|
509
|
515
|
|
510
|
|
- previewHouseImage (current, urls) {
|
|
516
|
+ previewHouseImage(current, urls) {
|
511
|
517
|
Taro.previewImage({
|
512
|
518
|
current,
|
513
|
519
|
urls
|
514
|
520
|
})
|
515
|
521
|
}
|
516
|
522
|
|
517
|
|
- renderBuildingProjectTypeList () {
|
|
523
|
+ renderBuildingProjectTypeList() {
|
518
|
524
|
const { statusOpts } = this.state
|
519
|
525
|
const { projectDetail: { buildingProjectType = [], status, marketStatus } } = this.props
|
520
|
526
|
return (
|
|
@@ -574,7 +580,7 @@ export default class Index extends Component {
|
574
|
580
|
}
|
575
|
581
|
|
576
|
582
|
|
577
|
|
- renderPhotoAlbum () {
|
|
583
|
+ renderPhotoAlbum() {
|
578
|
584
|
const { projectDetail: { buildingApartment } } = this.props
|
579
|
585
|
const list = buildingApartment.filter(item => item.apartmentType === 'photo')
|
580
|
586
|
// const imgList = list.reduce((prev, cur) => {
|
|
@@ -606,15 +612,15 @@ export default class Index extends Component {
|
606
|
612
|
console.log(buildingImgUrl, 'buildingImgUrl')
|
607
|
613
|
|
608
|
614
|
// if (buildingImgUrl != null) {
|
609
|
|
- return (<View>
|
|
615
|
+ return (<View key={index + "listimg"}>
|
610
|
616
|
{buildingImgUrl != null && (<View
|
611
|
617
|
style={{ marginRight: '8px' }}
|
612
|
618
|
>
|
613
|
619
|
|
614
|
620
|
<View>
|
615
|
621
|
<Image className='albumimg' src={getThumbnail(buildingImgList[0].url)} ></Image>
|
616
|
|
- <View style={{ width: '218rpx', display: 'flex',justifyContent:'center' }} >
|
617
|
|
- <View style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}> {apartmentName} </View>
|
|
622
|
+ <View style={{ width: '218rpx', display: 'flex', justifyContent: 'center' }} >
|
|
623
|
+ <View style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}> {apartmentName} </View>
|
618
|
624
|
<View> ({buildingImgList.length})</View>
|
619
|
625
|
</View>
|
620
|
626
|
</View>
|
|
@@ -633,7 +639,7 @@ export default class Index extends Component {
|
633
|
639
|
</Block>
|
634
|
640
|
)
|
635
|
641
|
}
|
636
|
|
- rendercircum () {
|
|
642
|
+ rendercircum() {
|
637
|
643
|
const building = {
|
638
|
644
|
...this.props.projectDetail
|
639
|
645
|
}
|
|
@@ -650,7 +656,7 @@ export default class Index extends Component {
|
650
|
656
|
)
|
651
|
657
|
}
|
652
|
658
|
|
653
|
|
- renderConsuler () {
|
|
659
|
+ renderConsuler() {
|
654
|
660
|
const { userInfo: { person: { phone } } } = this.props
|
655
|
661
|
const { projectDetail: { consultants = [] } } = this.props
|
656
|
662
|
return (
|
|
@@ -723,7 +729,7 @@ export default class Index extends Component {
|
723
|
729
|
)
|
724
|
730
|
}
|
725
|
731
|
|
726
|
|
- renderStatement () {
|
|
732
|
+ renderStatement() {
|
727
|
733
|
return (
|
728
|
734
|
<View className='statement'>
|
729
|
735
|
免责条款:以上价格仅供参考,具体一房一价的信息以售楼处展示为准。本网显示房屋位置、交通、医疗、教育、商业等配套信息,来源于第三方网络数据,不作为要约,仅供参考,双方具体权利义务应以法律规定及买卖合同约定为准。<br></br>本平台对项目周边文化教育的介绍旨在提供相关信息,并不意味着信息发布方对就学安排作出承诺。相关教育资源就学信息存在调整的可能,应以政府教育主管部门及办学颁布的政策规定为准。
|
|
@@ -732,7 +738,7 @@ export default class Index extends Component {
|
732
|
738
|
}
|
733
|
739
|
|
734
|
740
|
|
735
|
|
- renderHelp () {
|
|
741
|
+ renderHelp() {
|
736
|
742
|
const { helpList } = this.state
|
737
|
743
|
return (
|
738
|
744
|
<Block>
|
|
@@ -753,17 +759,17 @@ export default class Index extends Component {
|
753
|
759
|
)
|
754
|
760
|
}
|
755
|
761
|
|
756
|
|
- handleHelpClick (item) {
|
|
762
|
+ handleHelpClick(item) {
|
757
|
763
|
Taro.navigateTo({
|
758
|
764
|
url: '/pages/activity/detail/assistance?id=' + item.activityId
|
759
|
765
|
})
|
760
|
766
|
}
|
761
|
|
- handleGroupClick (item) {
|
|
767
|
+ handleGroupClick(item) {
|
762
|
768
|
Taro.navigateTo({
|
763
|
769
|
url: '/pages/activity/detail/assemble?id=' + item.activityId
|
764
|
770
|
})
|
765
|
771
|
}
|
766
|
|
- renderGroup () {
|
|
772
|
+ renderGroup() {
|
767
|
773
|
const { groupList } = this.state
|
768
|
774
|
return (
|
769
|
775
|
<Block>
|
|
@@ -787,7 +793,7 @@ export default class Index extends Component {
|
787
|
793
|
}
|
788
|
794
|
|
789
|
795
|
renderHouseTypeList () {
|
790
|
|
- const { statusOpts } = this.state
|
|
796
|
+ const { statusOpts, statusBgColors } = this.state
|
791
|
797
|
const { projectDetail: { buildingApartment } } = this.props
|
792
|
798
|
const list = buildingApartment.filter(item => item.apartmentType === 'apart')
|
793
|
799
|
let imgUrls = list.reduce((prev, cur) => {
|
|
@@ -809,9 +815,8 @@ export default class Index extends Component {
|
809
|
815
|
{
|
810
|
816
|
item && (
|
811
|
817
|
<View className='house__img-info'>
|
812
|
|
- {console.log(list, '-------')}
|
813
|
818
|
<Image className='house__img' src={getThumbnail(item.buildingImgList[0].url)} mode="widthFix" onClick={this.handlePreviewHxImage.bind(this, item.buildingImgList[0].url, imgUrls)}></Image>
|
814
|
|
- <View className='house-type__state'>{statusOpts[item.marketStatus - 1]}</View>
|
|
819
|
+ <View className='house-type__state' style={`background-color: ${statusBgColors[item.marketStatus - 1]}`}>{statusOpts[item.marketStatus - 1]}</View>
|
815
|
820
|
</View>
|
816
|
821
|
)
|
817
|
822
|
}
|
|
@@ -835,7 +840,7 @@ export default class Index extends Component {
|
835
|
840
|
|
836
|
841
|
)
|
837
|
842
|
}
|
838
|
|
- renderActivities () {
|
|
843
|
+ renderActivities() {
|
839
|
844
|
// renderGroup () {
|
840
|
845
|
// const { groupList } = this.state
|
841
|
846
|
// return (
|
|
@@ -909,7 +914,7 @@ export default class Index extends Component {
|
909
|
914
|
</Block>
|
910
|
915
|
)
|
911
|
916
|
}
|
912
|
|
- renderNews () {
|
|
917
|
+ renderNews() {
|
913
|
918
|
const { newsList } = this.state
|
914
|
919
|
return (
|
915
|
920
|
<Block>
|
|
@@ -941,7 +946,7 @@ export default class Index extends Component {
|
941
|
946
|
)
|
942
|
947
|
}
|
943
|
948
|
// 开始播放
|
944
|
|
- plagVideo () {
|
|
949
|
+ plagVideo() {
|
945
|
950
|
let videoContext = wx.createVideoContext('myVideo')
|
946
|
951
|
console.log()
|
947
|
952
|
// this.setState({
|
|
@@ -964,7 +969,7 @@ export default class Index extends Component {
|
964
|
969
|
// }
|
965
|
970
|
|
966
|
971
|
|
967
|
|
- renderVideo () {
|
|
972
|
+ renderVideo() {
|
968
|
973
|
const { videoPlayShow } = this.state
|
969
|
974
|
const { projectDetail } = this.props
|
970
|
975
|
const { videoImage } = projectDetail
|
|
@@ -986,16 +991,12 @@ export default class Index extends Component {
|
986
|
991
|
}}
|
987
|
992
|
id='myVideo'
|
988
|
993
|
controls={true}
|
989
|
|
- initialTime='0'
|
990
|
|
-
|
991
|
|
- loop={false}
|
992
|
|
- muted={false}
|
993
|
|
- // autoplay={false}
|
994
|
|
- // initialTime='0'
|
995
|
|
- // loop={true}
|
996
|
|
- // muted={false}
|
997
|
|
-
|
998
|
|
- show-mute-btn={true}
|
|
994
|
+ // autoplay={false}
|
|
995
|
+ // initialTime='0'
|
|
996
|
+ // loop={true}
|
|
997
|
+ // muted={false}
|
|
998
|
+
|
|
999
|
+ show-mute-btn='true'
|
999
|
1000
|
// onPlay={this.onPlay}
|
1000
|
1001
|
// show-center-play-btn='false'
|
1001
|
1002
|
// onPause= {this.onPause}
|
|
@@ -1017,13 +1018,13 @@ export default class Index extends Component {
|
1017
|
1018
|
)
|
1018
|
1019
|
}
|
1019
|
1020
|
|
1020
|
|
- changeCurrent (current) {
|
|
1021
|
+ changeCurrent(current) {
|
1021
|
1022
|
this.setState({
|
1022
|
1023
|
current: current + 1
|
1023
|
1024
|
})
|
1024
|
1025
|
}
|
1025
|
1026
|
|
1026
|
|
- render () {
|
|
1027
|
+ render() {
|
1027
|
1028
|
const { posterStatus, posterData, loaded, btnstate } = this.state
|
1028
|
1029
|
const { projectDetail } = this.props
|
1029
|
1030
|
const { uvList = {} } = projectDetail
|