xujing 5 years ago
parent
commit
e5c5d3a439

+ 2
- 2
config/dev.js View File

9
     WSS_HOST: '"wss://dev.jinchengjiaye.com"',
9
     WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
     // HOST: '"https://lt.pawoma.cn"',
10
     // HOST: '"https://lt.pawoma.cn"',
11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12
-    // HOST: '"http://192.168.2.52:8080"',
13
-    // WSS_HOST: '"ws://192.168.2.52:8080"',
12
+    // HOST: '"http://192.168.2.51:8080"',
13
+    // WSS_HOST: '"ws://192.168.2.51:8080"',
14
   },
14
   },
15
   weapp: {},
15
   weapp: {},
16
   h5: {}
16
   h5: {}

+ 8
- 26
src/pages/activity/activity.js View File

38
       console.log('活动列表')
38
       console.log('活动列表')
39
     })
39
     })
40
   }
40
   }
41
-  // componentWillMount() {
42
-  //   console.log(Taro.getApp().props, "Taro.getApp()")
43
-  //   if (Taro.getApp().props.projectIndex) {
44
-  //     this.setState({
45
-  //       current: 1
46
-  //     })
47
-  //   }
48
-  //   else {
49
-  //     this.setState({
50
-  //       current: 0
51
-  //     })
52
-  //   }
53
-  // }
54
-  // componentDidShow() {
55
-  //   if (Taro.getApp().props.projectIndex == 1) {
56
-  //     this.setState({
57
-  //       current: 1
58
-  //     })
59
-  //     Taro.getApp().props.projectIndex = 2
60
-  //   }
61
-  //   else {
62
-  //     this.setState({
63
-  //       current: 0
64
-  //     })
65
-  //   }
66
-  // }
41
+
42
+  componentDidShow() {
43
+    if (Taro.getApp().props.projectIndex == 1) {
44
+      this.setState({
45
+        current: 1
46
+      }, Taro.getApp().props.projectIndex = 0)
47
+    }
48
+  }
67
   componentWillUnmount() {
49
   componentWillUnmount() {
68
     const { recordId } = this.state
50
     const { recordId } = this.state
69
     recordId && updatePoint(recordId)
51
     recordId && updatePoint(recordId)

+ 1
- 1
src/pages/person/accessRecord.js View File

113
     e.stopPropagation()
113
     e.stopPropagation()
114
     const { userInfo: { person: { personId, nickname, name } } } = this.props
114
     const { userInfo: { person: { personId, nickname, name } } } = this.props
115
     Taro.navigateTo({
115
     Taro.navigateTo({
116
-      url: `/pages/im/index?sendId=${personId}&sendName=${encodeURIComponent(name || nickname)}&receiverId=${item.personId}&receiverName=${encodeURIComponent(item.userName)}`
116
+      url: `/pages/im/index?sendId=${personId}&sendName=${encodeURIComponent(name || nickname)}&receiverId=${item.personId}&receiverName=${encodeURIComponent(item.name || item.nickname)}`
117
     })
117
     })
118
   }
118
   }
119
   renderPop() {
119
   renderPop() {

+ 75
- 77
src/pages/project/detail/index.js View File

28
 import getUserPhone from '@utils/getUserPhone'
28
 import getUserPhone from '@utils/getUserPhone'
29
 import { ROLE_CODE } from '@constants/user'
29
 import { ROLE_CODE } from '@constants/user'
30
 const buildBg = 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/buildbg.png'
30
 const buildBg = 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/buildbg.png'
31
+const dotImg = require('@assets/dot.png')
31
 
32
 
32
 @connect(
33
 @connect(
33
   ({ user, project }) => ({ ...user, ...project }),
34
   ({ user, project }) => ({ ...user, ...project }),
62
     grantPhoneVisible: false, // 授权手机弹框
63
     grantPhoneVisible: false, // 授权手机弹框
63
   }
64
   }
64
 
65
 
65
-  componentWillMount () {
66
+  componentWillMount() {
66
     ready.queue(() => {
67
     ready.queue(() => {
67
       // 分享场景需要先授权手机, 再授权头像
68
       // 分享场景需要先授权手机, 再授权头像
68
       const options = wx.getLaunchOptionsSync()
69
       const options = wx.getLaunchOptionsSync()
80
         })
81
         })
81
       }
82
       }
82
 
83
 
83
-      
84
+
84
       const router = Taro.getStorageSync('router')
85
       const router = Taro.getStorageSync('router')
85
       const id = this.$router.params.id || router.query.id
86
       const id = this.$router.params.id || router.query.id
86
 
87
 
100
     })
101
     })
101
   }
102
   }
102
 
103
 
103
-  componentWillUnmount () {
104
+  componentWillUnmount() {
104
     const { recordId } = this.state
105
     const { recordId } = this.state
105
     recordId && updatePoint(recordId)
106
     recordId && updatePoint(recordId)
106
   }
107
   }
107
 
108
 
108
-  initPageData (id) {
109
+  initPageData(id) {
109
     console.log('----项目ID---->', id)
110
     console.log('----项目ID---->', id)
110
 
111
 
111
     // const id='82b54f4a1f5b981df572253792afbfa1' 
112
     // const id='82b54f4a1f5b981df572253792afbfa1' 
135
     })
136
     })
136
   }
137
   }
137
 
138
 
138
-  loadHelpGroupList () {
139
+  loadHelpGroupList() {
139
     const { buildingId } = this.state
140
     const { buildingId } = this.state
140
 
141
 
141
     queryHelpGroup({ buildingId: buildingId }).then(res => {
142
     queryHelpGroup({ buildingId: buildingId }).then(res => {
157
     )
158
     )
158
   }
159
   }
159
 
160
 
160
-  loadDetail () {
161
+  loadDetail() {
161
     const { buildingId } = this.state
162
     const { buildingId } = this.state
162
     const { dispatchProjectDetail } = this.props
163
     const { dispatchProjectDetail } = this.props
163
     this.setState({
164
     this.setState({
185
     })
186
     })
186
   }
187
   }
187
 
188
 
188
-  loadActivityData () {
189
+  loadActivityData() {
189
     const { buildingId } = this.state
190
     const { buildingId } = this.state
190
     const payload = { pageSize: 999, pageNumber: 1, buildingId }
191
     const payload = { pageSize: 999, pageNumber: 1, buildingId }
191
     queryActivityList(payload).then(res => {
192
     queryActivityList(payload).then(res => {
196
     })
197
     })
197
   }
198
   }
198
 
199
 
199
-  loadNewsData () {
200
+  loadNewsData() {
200
     const { buildingId } = this.state
201
     const { buildingId } = this.state
201
     const payload = { pageSize: 2, pageNumber: 1, buildingId }
202
     const payload = { pageSize: 2, pageNumber: 1, buildingId }
202
     queryNewsList(payload).then(res => {
203
     queryNewsList(payload).then(res => {
206
     })
207
     })
207
   }
208
   }
208
 
209
 
209
-  navigateTo (url) {
210
+  navigateTo(url) {
210
     Taro.navigateTo({ url: url })
211
     Taro.navigateTo({ url: url })
211
   }
212
   }
212
   // 海报预览图
213
   // 海报预览图
213
-  previewImage (arr) {
214
+  previewImage(arr) {
214
     // console.log('arr:' + arr)
215
     // console.log('arr:' + arr)
215
     if (arr[0].length > 1) {
216
     if (arr[0].length > 1) {
216
       Taro.previewImage({
217
       Taro.previewImage({
237
     })
238
     })
238
   }
239
   }
239
 
240
 
240
-  openMap () {
241
+  openMap() {
241
     const {
242
     const {
242
       buildingName,
243
       buildingName,
243
       address,
244
       address,
264
     })
265
     })
265
   }
266
   }
266
 
267
 
267
-  toViewAlbum (index) {
268
+  toViewAlbum(index) {
268
     const { buildingId } = this.state
269
     const { buildingId } = this.state
269
     console.log('1111111', index)
270
     console.log('1111111', index)
270
     this.navigateTo(`/pages/project/album/index?id=${buildingId}&current=${index}`)
271
     this.navigateTo(`/pages/project/album/index?id=${buildingId}&current=${index}`)
271
   }
272
   }
272
 
273
 
273
-  onViewFans () {
274
+  onViewFans() {
274
     const { buildingId } = this.state
275
     const { buildingId } = this.state
275
     this.navigateTo('/pages/card/fans/index?type=item&id=' + buildingId)
276
     this.navigateTo('/pages/card/fans/index?type=item&id=' + buildingId)
276
   }
277
   }
299
     }
300
     }
300
   }
301
   }
301
 
302
 
302
-  getPhoneNumber (e, item) {
303
+  getPhoneNumber(e, item) {
303
     getUserPhone(e, (phoneNumber) => {
304
     getUserPhone(e, (phoneNumber) => {
304
       const { userInfo: { person: { personId, nickname, name } } } = this.props
305
       const { userInfo: { person: { personId, nickname, name } } } = this.props
305
       Taro.navigateTo({
306
       Taro.navigateTo({
308
     })
309
     })
309
   }
310
   }
310
 
311
 
311
-  getPosterData () {
312
+  getPosterData() {
312
     return new Promise(resolve => {
313
     return new Promise(resolve => {
313
       const { posterData } = this.state
314
       const { posterData } = this.state
314
       if (posterData.qrcode) {
315
       if (posterData.qrcode) {
380
     })
381
     })
381
   }
382
   }
382
 
383
 
383
-  handleTelClick (item, e) {
384
+  handleTelClick(item, e) {
384
     e.stopPropagation()
385
     e.stopPropagation()
385
     Taro.makePhoneCall({
386
     Taro.makePhoneCall({
386
       phoneNumber: item.phone
387
       phoneNumber: item.phone
387
     })
388
     })
388
   }
389
   }
389
 
390
 
390
-  handleChatClick (item, e) {
391
+  handleChatClick(item, e) {
391
     e.stopPropagation()
392
     e.stopPropagation()
392
     const { userInfo: { person: { personId, nickname, name } } } = this.props
393
     const { userInfo: { person: { personId, nickname, name } } } = this.props
393
     Taro.navigateTo({
394
     Taro.navigateTo({
395
     })
396
     })
396
   }
397
   }
397
 
398
 
398
-  handleConsuItemClick (item) {
399
+  handleConsuItemClick(item) {
399
     Taro.navigateTo({
400
     Taro.navigateTo({
400
       url: `/pages/card/index?id=${item.id}`
401
       url: `/pages/card/index?id=${item.id}`
401
     })
402
     })
402
   }
403
   }
403
 
404
 
404
-  handleMoreClick () {
405
+  handleMoreClick() {
405
     // App.zhuge.track('查看置业顾问列表')
406
     // App.zhuge.track('查看置业顾问列表')
406
     Taro.navigateTo({
407
     Taro.navigateTo({
407
       url: `/pages/card/list/index?buildingId=${this.state.buildingId}`
408
       url: `/pages/card/list/index?buildingId=${this.state.buildingId}`
408
     })
409
     })
409
   }
410
   }
410
 
411
 
411
-  handleStopPropagation (e) {
412
+  handleStopPropagation(e) {
412
     e.stopPropagation()
413
     e.stopPropagation()
413
   }
414
   }
414
 
415
 
415
-  toRecomonedPage () {
416
+  toRecomonedPage() {
416
     const {
417
     const {
417
       userInfo: { person: { personType } }
418
       userInfo: { person: { personType } }
418
     } = this.props
419
     } = this.props
423
       })
424
       })
424
     } else {
425
     } else {
425
       Taro.navigateTo({
426
       Taro.navigateTo({
426
-        url: `/pages/agent/recommend/index?type=projectDeatil` 
427
+        url: `/pages/agent/recommend/index?type=projectDeatil`
427
       })
428
       })
428
     }
429
     }
429
   }
430
   }
430
 
431
 
431
-  toHome () {
432
+  toHome() {
432
     Taro.switchTab({
433
     Taro.switchTab({
433
       url: `/pages/project/index`
434
       url: `/pages/project/index`
434
     })
435
     })
435
   }
436
   }
436
 
437
 
437
-  HandleCircumTabClick (id) {
438
+  HandleCircumTabClick(id) {
438
     this.setState({
439
     this.setState({
439
       curTab: id
440
       curTab: id
440
     })
441
     })
441
   }
442
   }
442
 
443
 
443
-  handleNewsMoreClick () {
444
+  handleNewsMoreClick() {
444
     Taro.navigateTo({
445
     Taro.navigateTo({
445
       url: `/pages/news/index?buildingId=` + this.state.buildingId
446
       url: `/pages/news/index?buildingId=` + this.state.buildingId
446
     })
447
     })
447
   }
448
   }
448
 
449
 
449
-  handNewsItemClick (id) {
450
+  handNewsItemClick(id) {
450
     Taro.navigateTo({
451
     Taro.navigateTo({
451
       url: '/pages/news/detail/index?id=' + id
452
       url: '/pages/news/detail/index?id=' + id
452
     })
453
     })
453
   }
454
   }
454
 
455
 
455
-  handleActivityMoreClick () {
456
+  handleActivityMoreClick() {
456
     Taro.navigateTo({
457
     Taro.navigateTo({
457
       url: `/pages/activity/index?buildingId=` + this.state.buildingId
458
       url: `/pages/activity/index?buildingId=` + this.state.buildingId
458
     })
459
     })
459
   }
460
   }
460
 
461
 
461
-  handActivityItemClick (item) {
462
+  handActivityItemClick(item) {
462
     Taro.navigateTo({
463
     Taro.navigateTo({
463
       url: '/pages/activity/detail/index?id=' + item.dynamicId
464
       url: '/pages/activity/detail/index?id=' + item.dynamicId
464
     })
465
     })
465
   }
466
   }
466
 
467
 
467
-  handlePreviewHxImage (current, urls) {
468
+  handlePreviewHxImage(current, urls) {
468
     Taro.previewImage({
469
     Taro.previewImage({
469
       current,
470
       current,
470
       urls
471
       urls
471
     })
472
     })
472
   }
473
   }
473
 
474
 
474
-  handleFavor () {
475
+  handleFavor() {
475
     const { buildingId, isSaved } = this.state
476
     const { buildingId, isSaved } = this.state
476
     if (isSaved) {
477
     if (isSaved) {
477
       cancelFavorProject(buildingId).then(res => {
478
       cancelFavorProject(buildingId).then(res => {
501
       console.log('活动项目收藏')
502
       console.log('活动项目收藏')
502
     })
503
     })
503
   }
504
   }
504
-  handleToolsClick () {
505
+  handleToolsClick() {
505
     Taro.navigateTo({
506
     Taro.navigateTo({
506
       url: `/pages/toolKit/index`
507
       url: `/pages/toolKit/index`
507
     })
508
     })
508
   }
509
   }
509
-  moreFloor () {
510
+  moreFloor() {
510
     Taro.navigateTo({
511
     Taro.navigateTo({
511
       url: `/pages/project/floor/index`
512
       url: `/pages/project/floor/index`
512
     })
513
     })
522
     this.initPageData(this.state.buildingId)
523
     this.initPageData(this.state.buildingId)
523
   }
524
   }
524
 
525
 
525
-  renderBottomMenu () {
526
+  renderBottomMenu() {
526
     const { userInfo: { person: { personType } } } = this.props
527
     const { userInfo: { person: { personType } } } = this.props
527
     const { posterShow } = this.state
528
     const { posterShow } = this.state
528
     return (
529
     return (
557
     )
558
     )
558
   }
559
   }
559
 
560
 
560
-  previewHouseImage (current, urls) {
561
+  previewHouseImage(current, urls) {
561
     Taro.previewImage({
562
     Taro.previewImage({
562
       current,
563
       current,
563
       urls
564
       urls
564
     })
565
     })
565
   }
566
   }
566
 
567
 
567
-  renderBuildingProjectTypeList () {
568
+  renderBuildingProjectTypeList() {
568
     const { statusOpts } = this.state
569
     const { statusOpts } = this.state
569
     const { projectDetail: { buildingProjectType = [], status, marketStatus } } = this.props
570
     const { projectDetail: { buildingProjectType = [], status, marketStatus } } = this.props
570
     return (
571
     return (
624
   }
625
   }
625
 
626
 
626
 
627
 
627
-  renderPhotoAlbum () {
628
+  renderPhotoAlbum() {
628
     const { projectDetail: { buildingApartment } } = this.props
629
     const { projectDetail: { buildingApartment } } = this.props
629
     const list = buildingApartment.filter(item => item.apartmentType === 'photo')
630
     const list = buildingApartment.filter(item => item.apartmentType === 'photo')
630
     // const imgList = list.reduce((prev, cur) => {
631
     // const imgList = list.reduce((prev, cur) => {
685
       </Block>
686
       </Block>
686
     )
687
     )
687
   }
688
   }
688
-  rendercircum () {
689
+  rendercircum() {
689
     const building = {
690
     const building = {
690
       ...this.props.projectDetail
691
       ...this.props.projectDetail
691
     }
692
     }
702
     )
703
     )
703
   }
704
   }
704
 
705
 
705
-  renderConsuler () {
706
+  renderConsuler() {
706
     const { userInfo: { person: { phone } } } = this.props
707
     const { userInfo: { person: { phone } } } = this.props
707
     const { projectDetail: { consultants = [] } } = this.props
708
     const { projectDetail: { consultants = [] } } = this.props
708
     return (
709
     return (
745
                           <Text className="name">{item.userName}</Text>
746
                           <Text className="name">{item.userName}</Text>
746
                           <Text className='txt'>{item.description || ' '}</Text>
747
                           <Text className='txt'>{item.description || ' '}</Text>
747
                         </View>
748
                         </View>
748
-
749
                       </View>
749
                       </View>
750
                       <View className="flex item-btn__box">
750
                       <View className="flex item-btn__box">
751
 
751
 
775
     )
775
     )
776
   }
776
   }
777
 
777
 
778
-  renderStatement () {
778
+  renderStatement() {
779
     return (
779
     return (
780
       <View className='statement'>
780
       <View className='statement'>
781
         免责条款:以上价格仅供参考,具体一房一价的信息以售楼处展示为准。本网显示房屋位置、交通、医疗、教育、商业等配套信息,来源于第三方网络数据,不作为要约,仅供参考,双方具体权利义务应以法律规定及买卖合同约定为准。<br></br>本平台对项目周边文化教育的介绍旨在提供相关信息,并不意味着信息发布方对就学安排作出承诺。相关教育资源就学信息存在调整的可能,应以政府教育主管部门及办学颁布的政策规定为准。
781
         免责条款:以上价格仅供参考,具体一房一价的信息以售楼处展示为准。本网显示房屋位置、交通、医疗、教育、商业等配套信息,来源于第三方网络数据,不作为要约,仅供参考,双方具体权利义务应以法律规定及买卖合同约定为准。<br></br>本平台对项目周边文化教育的介绍旨在提供相关信息,并不意味着信息发布方对就学安排作出承诺。相关教育资源就学信息存在调整的可能,应以政府教育主管部门及办学颁布的政策规定为准。
784
   }
784
   }
785
 
785
 
786
 
786
 
787
-  renderHelp () {
787
+  renderHelp() {
788
     const { helpList } = this.state
788
     const { helpList } = this.state
789
     return (
789
     return (
790
       <Block>
790
       <Block>
805
     )
805
     )
806
   }
806
   }
807
 
807
 
808
-  handleHelpClick (item) {
808
+  handleHelpClick(item) {
809
     Taro.navigateTo({
809
     Taro.navigateTo({
810
       url: '/pages/activity/detail/assistance?id=' + item.activityId
810
       url: '/pages/activity/detail/assistance?id=' + item.activityId
811
     })
811
     })
812
   }
812
   }
813
-  handleGroupClick (item) {
813
+  handleGroupClick(item) {
814
     Taro.navigateTo({
814
     Taro.navigateTo({
815
       url: '/pages/activity/detail/assemble?id=' + item.activityId
815
       url: '/pages/activity/detail/assemble?id=' + item.activityId
816
     })
816
     })
817
   }
817
   }
818
-  renderGroup () {
818
+  renderGroup() {
819
     const { groupList } = this.state
819
     const { groupList } = this.state
820
     return (
820
     return (
821
       <Block>
821
       <Block>
838
     )
838
     )
839
   }
839
   }
840
 
840
 
841
-  renderHouseTypeList () {
841
+  renderHouseTypeList() {
842
     const { statusOpts, statusBgColors } = this.state
842
     const { statusOpts, statusBgColors } = this.state
843
     const { projectDetail: { buildingApartment } } = this.props
843
     const { projectDetail: { buildingApartment } } = this.props
844
     const list = buildingApartment.filter(item => item.apartmentType === 'apart')
844
     const list = buildingApartment.filter(item => item.apartmentType === 'apart')
886
 
886
 
887
     )
887
     )
888
   }
888
   }
889
-  renderActivities () {
889
+  renderActivities() {
890
 
890
 
891
 
891
 
892
     const { activityList } = this.state
892
     const { activityList } = this.state
923
       </Block>
923
       </Block>
924
     )
924
     )
925
   }
925
   }
926
-  renderNews () {
926
+  renderNews() {
927
     const { newsList } = this.state
927
     const { newsList } = this.state
928
     return (
928
     return (
929
       <Block>
929
       <Block>
955
     )
955
     )
956
   }
956
   }
957
   // 开始播放
957
   // 开始播放
958
-  plagVideo () {
958
+  plagVideo() {
959
     let videoContext = wx.createVideoContext('myVideo')
959
     let videoContext = wx.createVideoContext('myVideo')
960
     console.log()
960
     console.log()
961
     // this.setState({
961
     // this.setState({
963
     // })
963
     // })
964
     videoContext.play()
964
     videoContext.play()
965
   }
965
   }
966
-  bindended () {
966
+  bindended() {
967
     let videoContext = wx.createVideoContext('myVideo')
967
     let videoContext = wx.createVideoContext('myVideo')
968
     console.log('111111')
968
     console.log('111111')
969
     // videoContext.stop()//停止
969
     // videoContext.stop()//停止
978
     console.log(e, '111111')
978
     console.log(e, '111111')
979
 
979
 
980
     let videoContext = wx.createVideoContext('myVideo')
980
     let videoContext = wx.createVideoContext('myVideo')
981
-    if (e.detail.fullScreen ) {
981
+    if (e.detail.fullScreen) {
982
       console.log(videoContext, '22222')
982
       console.log(videoContext, '22222')
983
-videoContext.poster = undefined
983
+      videoContext.poster = undefined
984
       console.log(videoContext, '22222')
984
       console.log(videoContext, '22222')
985
     }
985
     }
986
     else {
986
     else {
987
       console.log(videoContext, '33333')
987
       console.log(videoContext, '33333')
988
       console.log(imgSrc, 'imgSrc')
988
       console.log(imgSrc, 'imgSrc')
989
-      videoContext.poster = imgSrc 
989
+      videoContext.poster = imgSrc
990
       console.log(videoContext, '33333')
990
       console.log(videoContext, '33333')
991
     }
991
     }
992
     // VideoContext.pause()
992
     // VideoContext.pause()
1004
   // }
1004
   // }
1005
 
1005
 
1006
 
1006
 
1007
-  renderVideo () {
1007
+  renderVideo() {
1008
     const { videoPlayShow } = this.state
1008
     const { videoPlayShow } = this.state
1009
     const { projectDetail } = this.props
1009
     const { projectDetail } = this.props
1010
     const { videoImage } = projectDetail
1010
     const { videoImage } = projectDetail
1035
           // muted={false}
1035
           // muted={false}
1036
 
1036
 
1037
           showMuteBtn='true'
1037
           showMuteBtn='true'
1038
-        onPlay={this.onPlay}
1038
+          onPlay={this.onPlay}
1039
         // show-center-play-btn='false'
1039
         // show-center-play-btn='false'
1040
         // onPause= {this.onPause}
1040
         // onPause= {this.onPause}
1041
 
1041
 
1056
     )
1056
     )
1057
   }
1057
   }
1058
 
1058
 
1059
-  changeCurrent (current) {
1060
-    console.log(current,'current')
1059
+  changeCurrent(current) {
1060
+    console.log(current, 'current')
1061
     this.setState({
1061
     this.setState({
1062
       current: current + 1
1062
       current: current + 1
1063
     })
1063
     })
1064
   }
1064
   }
1065
 
1065
 
1066
-  render () {
1066
+  render() {
1067
     const { posterStatus, posterData, loaded, btnstate, grantPhoneVisible } = this.state
1067
     const { posterStatus, posterData, loaded, btnstate, grantPhoneVisible } = this.state
1068
     const { projectDetail, userInfo } = this.props
1068
     const { projectDetail, userInfo } = this.props
1069
     const { uvList = {} } = projectDetail
1069
     const { uvList = {} } = projectDetail
1081
             <View className='detail'>
1081
             <View className='detail'>
1082
               <Notice></Notice>
1082
               <Notice></Notice>
1083
               {/* {(projectDetail.videoUrl == null || btnstate === 0) && ( */}
1083
               {/* {(projectDetail.videoUrl == null || btnstate === 0) && ( */}
1084
-                <View
1085
-                  className="pro__banner"
1086
-                  onClick={this.previewImage.bind(this, projectDetail.buildingImg)}>
1087
-                  <Banner
1088
-                    list={projectDetail.buildingImg}
1089
-                    indicatorDots={false}
1090
-                    // current
1091
-                    // isChange = {true}
1092
-                    onChange={this.changeCurrent.bind(this)}
1093
-                    style={{
1094
-                      height: '600rpx'
1095
-                    }}
1096
-
1097
-                  ></Banner>
1098
-                  <Text className="pro__banner-text">{this.current}/{(projectDetail.buildingImg && projectDetail.buildingImg.length) || 0}</Text>
1099
-                </View>
1084
+              <View
1085
+                className="pro__banner"
1086
+                onClick={this.previewImage.bind(this, projectDetail.buildingImg)}>
1087
+                <Banner
1088
+                  list={projectDetail.buildingImg}
1089
+                  indicatorDots={false}
1090
+                  // current
1091
+                  // isChange = {true}
1092
+                  onChange={this.changeCurrent.bind(this)}
1093
+                  style={{
1094
+                    height: '600rpx'
1095
+                  }}
1096
+
1097
+                ></Banner>
1098
+                <Text className="pro__banner-text">{this.current}/{(projectDetail.buildingImg && projectDetail.buildingImg.length) || 0}</Text>
1099
+              </View>
1100
               {/* )} */}
1100
               {/* )} */}
1101
 
1101
 
1102
               {/* {btnstate === 1 && projectDetail.videoUrl != null && this.renderVideo()} */}
1102
               {/* {btnstate === 1 && projectDetail.videoUrl != null && this.renderVideo()} */}
1182
                         <View className='top__txt'>{projectDetail.pvNum || 0}人围观</View>
1182
                         <View className='top__txt'>{projectDetail.pvNum || 0}人围观</View>
1183
                         <View className='bottom__img' onClick={this.onViewFans.bind(this)}>
1183
                         <View className='bottom__img' onClick={this.onViewFans.bind(this)}>
1184
                           <View className="records">
1184
                           <View className="records">
1185
-                            {records.slice(0, 9).map(item => <Image src={transferImage(item.photoOravatar)} className='user__img' key={item.personId} />)}
1186
-                            {records.length > 9 && <Text> ···</Text>}
1185
+                            {records.slice(0, 8).map(item => <Image src={transferImage(item.photoOravatar)} className='user__img' key={item.personId} />)}
1186
+                            {records.length > 8 && <Image className="dot-img" src={transferImage(dotImg)}></Image>}
1187
                           </View>
1187
                           </View>
1188
-
1189
                           <Text className="iconfont icon-more"></Text>
1188
                           <Text className="iconfont icon-more"></Text>
1190
                         </View>
1189
                         </View>
1191
                       </View>
1190
                       </View>
1192
                       <View className='more-btn' onClick={this.moreFloor}>更多楼盘信息</View>
1191
                       <View className='more-btn' onClick={this.moreFloor}>更多楼盘信息</View>
1193
                     </View>
1192
                     </View>
1194
                   </View>
1193
                   </View>
1195
-
1196
                   {/* 项目顾问 */}
1194
                   {/* 项目顾问 */}
1197
                   {this.renderConsuler()}
1195
                   {this.renderConsuler()}
1198
 
1196
 

+ 5
- 0
src/pages/project/detail/index.scss View File

638
             box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.14);
638
             box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.14);
639
             border: 2px solid rgba(255, 255, 255, 1);
639
             border: 2px solid rgba(255, 255, 255, 1);
640
           }
640
           }
641
+          .dot-img{
642
+            width: 40px;
643
+            height: 30px;
644
+          }
641
         }
645
         }
642
 
646
 
643
         .iconfont {
647
         .iconfont {
681
       .name-txt {
685
       .name-txt {
682
         display: flex;
686
         display: flex;
683
         flex-direction: column;
687
         flex-direction: column;
688
+        max-width: 400px;
684
 
689
 
685
         .name {
690
         .name {
686
           font-size: 32px;
691
           font-size: 32px;

+ 15
- 9
src/pages/project/h5Page.js View File

155
   onAvatarSuccess() {
155
   onAvatarSuccess() {
156
     this.setState({
156
     this.setState({
157
       avatarVisible: false,
157
       avatarVisible: false,
158
-      phoneVisible: true,
159
-    })
160
 
158
 
159
+    })
160
+    const { userInfo: { person: { phone } } } = this.props
161
+    if (phone) {
162
+      this.setState({
163
+        phoneVisible: false,
164
+        webViewVisible: true,
165
+      })
166
+      this.success()
167
+    } else {
168
+      this.setState({
169
+        phoneVisible: true,
170
+      })
171
+    }
161
     console.log("授权头像成功!")
172
     console.log("授权头像成功!")
162
   }
173
   }
163
   // 授权用户信息
174
   // 授权用户信息
175
           this.onAvatarSuccess();
186
           this.onAvatarSuccess();
176
           console.log('获取用户信息成功')
187
           console.log('获取用户信息成功')
177
           Taro.hideLoading()
188
           Taro.hideLoading()
178
-          const { userInfo: { person: { phone } } } = this.props
179
-          if (phone) {
180
-            this.setState({
181
-              phoneVisible: false,
182
-            })
183
-          }
184
         })
189
         })
185
       },
190
       },
186
       fail: (err) => {
191
       fail: (err) => {
226
       const realPhone = phone || tel
231
       const realPhone = phone || tel
227
       const payload = {
232
       const payload = {
228
         realtyConsultant: consultant, //报备人 置业顾问
233
         realtyConsultant: consultant, //报备人 置业顾问
229
-        phone: realPhone
234
+        phone: realPhone,
235
+        showToast: false
230
       }
236
       }
231
       reportClient(payload).then(res => {
237
       reportClient(payload).then(res => {
232
         console.log('恭喜您绑定成功')
238
         console.log('恭喜您绑定成功')

+ 4
- 3
src/pages/project/index.js View File

476
     })
476
     })
477
   }
477
   }
478
   toNewsList() {
478
   toNewsList() {
479
+    Taro.getApp().props.projectIndex = 1
479
     Taro.switchTab({
480
     Taro.switchTab({
480
-      url: `/pages/activity/activity?projectIndex=1`,
481
-      success: res => {
482
-        Taro.getApp().props.projectIndex = 1
481
+      url: `/pages/activity/activity`,
482
+      fail: res => {
483
+        Taro.getApp().props.projectIndex = 0
483
       }
484
       }
484
     })
485
     })
485
   }
486
   }

+ 8
- 6
src/utils/request.js View File

70
           })
70
           })
71
         }
71
         }
72
       }
72
       }
73
+      if (showToast) {
73
 
74
 
74
-      Taro.showToast({
75
-        title: message,
76
-        icon: 'none'
77
-      })
75
+        Taro.showToast({
76
+          title: message,
77
+          icon: 'none'
78
+        })
79
+      }
78
 
80
 
79
       throw res.data
81
       throw res.data
80
     }
82
     }
81
   }).catch((err) => {
83
   }).catch((err) => {
82
-    console.error(err,url)
83
-    
84
+    console.error(err, url)
85
+
84
     let errMessage = `请求失败: ${err.errMsg}`
86
     let errMessage = `请求失败: ${err.errMsg}`
85
     if (err.errMsg) {
87
     if (err.errMsg) {
86
       errMessage = '请检查网络'
88
       errMessage = '请检查网络'