Bläddra i källkod

fix map around

张延森 5 år sedan
förälder
incheckning
47954470d7
5 ändrade filer med 98 tillägg och 74 borttagningar
  1. 4
    4
      config/dev.js
  2. 4
    4
      config/prod.js
  3. 2
    2
      project.config.json
  4. 3
    3
      src/pages/person/personDetail/index.js
  5. 85
    61
      src/pages/project/detail/index.js

+ 4
- 4
config/dev.js Visa fil

@@ -5,10 +5,10 @@ module.exports = {
5 5
   defineConstants: {
6 6
     // HOST: '"http://47.101.36.130:8085"',//测试
7 7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8
-    // HOST:  '"https://dev.jinchengjiaye.com"',//测试
9
-    // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
-    HOST: '"https://lt.pawoma.cn"',
11
-    WSS_HOST: '"wss://lt.pawoma.cn"',
8
+    HOST:  '"https://dev.jinchengjiaye.com"',//测试
9
+    WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
+    // HOST: '"https://lt.pawoma.cn"',
11
+    // WSS_HOST: '"wss://lt.pawoma.cn"',
12 12
     // HOST: '"http://192.168.0.238:8080"',
13 13
     // WSS_HOST: '"ws://192.168.0.238:8080"',
14 14
   },

+ 4
- 4
config/prod.js Visa fil

@@ -5,10 +5,10 @@ module.exports = {
5 5
   defineConstants: {
6 6
     // HOST: '"http://192.168.0.218:8080"',
7 7
     // WSS_HOST: '"ws://192.168.0.218:8080"',
8
-    // HOST: '"https://dev.jinchengjiaye.com"',
9
-    // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
-      HOST: '"https://lt.pawoma.cn"',
11
-      WSS_HOST: '"wss://lt.pawoma.cn"',
8
+    HOST: '"https://dev.jinchengjiaye.com"',
9
+    WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
+      // HOST: '"https://lt.pawoma.cn"',
11
+      // WSS_HOST: '"wss://lt.pawoma.cn"',
12 12
   },
13 13
   weapp: {},
14 14
   h5: {}

+ 2
- 2
project.config.json Visa fil

@@ -1,8 +1,8 @@
1 1
 {
2 2
 	"miniprogramRoot": "dist/",
3 3
 	"projectname": "mini-chengjiao",
4
-	"description": "知与行互动",
5
-	"appid": "wxd6f47a9bb3052175",
4
+	"description": "知与行联调",
5
+	"appid": "wxd9ee3a9480a4e544",
6 6
 	"setting": {
7 7
 		"urlCheck": false,
8 8
 		"es6": false,

+ 3
- 3
src/pages/person/personDetail/index.js Visa fil

@@ -33,7 +33,7 @@ export default class personDetail extends Component {
33 33
       case ROLE_CODE['ESTATE_AGENT']:
34 34
         return '独立经纪人'
35 35
       case ROLE_CODE['CHANNEL_AGENT']:
36
-        return '渠道经纪人'
36
+        return '独立经纪人'
37 37
       default:
38 38
         return '普通用户'
39 39
     }
@@ -72,7 +72,7 @@ export default class personDetail extends Component {
72 72
             <Image src={require('@assets/person/arrow2.png')} mode="widthFix"></Image>
73 73
           </View>
74 74
         </View>
75
-        {
75
+        {/* {
76 76
           (user.personType == ROLE_CODE['CHANNEL_AGENT'] || user.personType == ROLE_CODE['ESTATE_AGENT']) &&
77 77
 
78 78
           <View className='col_box' onClick={this.goEdit.bind(this)}>
@@ -82,7 +82,7 @@ export default class personDetail extends Component {
82 82
               <Image src={require('@assets/person/arrow2.png')} mode="widthFix"></Image>
83 83
             </View>
84 84
           </View>
85
-        }
85
+        } */}
86 86
       </View>
87 87
     )
88 88
   }

+ 85
- 61
src/pages/project/detail/index.js Visa fil

@@ -61,7 +61,7 @@ export default class Index extends Component {
61 61
     grantPhoneVisible: false, // 授权手机弹框
62 62
   }
63 63
 
64
-  componentWillMount() {
64
+  componentWillMount () {
65 65
     ready.queue(() => {
66 66
       // 分享场景需要先授权手机, 再授权头像
67 67
       const options = wx.getLaunchOptionsSync()
@@ -83,12 +83,12 @@ export default class Index extends Component {
83 83
     })
84 84
   }
85 85
 
86
-  componentWillUnmount() {
86
+  componentWillUnmount () {
87 87
     const { recordId } = this.state
88 88
     recordId && updatePoint(recordId)
89 89
   }
90 90
 
91
-  initPageData() {
91
+  initPageData () {
92 92
     const router = Taro.getStorageSync('router')
93 93
     const id = this.$router.params.id || router.query.id
94 94
     // const id='82b54f4a1f5b981df572253792afbfa1' 
@@ -118,7 +118,7 @@ export default class Index extends Component {
118 118
     })
119 119
   }
120 120
 
121
-  loadHelpGroupList() {
121
+  loadHelpGroupList () {
122 122
     const { buildingId } = this.state
123 123
 
124 124
     queryHelpGroup({ buildingId: buildingId }).then(res => {
@@ -140,7 +140,7 @@ export default class Index extends Component {
140 140
     )
141 141
   }
142 142
 
143
-  loadDetail() {
143
+  loadDetail () {
144 144
     const { buildingId } = this.state
145 145
     const { dispatchProjectDetail } = this.props
146 146
     this.setState({
@@ -168,7 +168,7 @@ export default class Index extends Component {
168 168
     })
169 169
   }
170 170
 
171
-  loadActivityData() {
171
+  loadActivityData () {
172 172
     const { buildingId } = this.state
173 173
     const payload = { pageSize: 999, pageNumber: 1, buildingId }
174 174
     queryActivityList(payload).then(res => {
@@ -179,7 +179,7 @@ export default class Index extends Component {
179 179
     })
180 180
   }
181 181
 
182
-  loadNewsData() {
182
+  loadNewsData () {
183 183
     const { buildingId } = this.state
184 184
     const payload = { pageSize: 2, pageNumber: 1, buildingId }
185 185
     queryNewsList(payload).then(res => {
@@ -189,11 +189,11 @@ export default class Index extends Component {
189 189
     })
190 190
   }
191 191
 
192
-  navigateTo(url) {
192
+  navigateTo (url) {
193 193
     Taro.navigateTo({ url: url })
194 194
   }
195 195
   // 海报预览图
196
-  previewImage(arr) {
196
+  previewImage (arr) {
197 197
     // console.log('arr:' + arr)
198 198
     if (arr[0].length > 1) {
199 199
       Taro.previewImage({
@@ -220,7 +220,7 @@ export default class Index extends Component {
220 220
     })
221 221
   }
222 222
 
223
-  openMap() {
223
+  openMap () {
224 224
     const {
225 225
       buildingName,
226 226
       address,
@@ -247,13 +247,13 @@ export default class Index extends Component {
247 247
     })
248 248
   }
249 249
 
250
-  toViewAlbum(index) {
250
+  toViewAlbum (index) {
251 251
     const { buildingId } = this.state
252 252
     console.log('1111111', index)
253 253
     this.navigateTo(`/pages/project/album/index?id=${buildingId}&current=${index}`)
254 254
   }
255 255
 
256
-  onViewFans() {
256
+  onViewFans () {
257 257
     const { buildingId } = this.state
258 258
     this.navigateTo('/pages/card/fans/index?type=item&id=' + buildingId)
259 259
   }
@@ -282,7 +282,7 @@ export default class Index extends Component {
282 282
     }
283 283
   }
284 284
 
285
-  getPhoneNumber(e, item) {
285
+  getPhoneNumber (e, item) {
286 286
     getUserPhone(e, (phoneNumber) => {
287 287
       const { userInfo: { person: { personId, nickname, name } } } = this.props
288 288
       Taro.navigateTo({
@@ -291,7 +291,7 @@ export default class Index extends Component {
291 291
     })
292 292
   }
293 293
 
294
-  getPosterData() {
294
+  getPosterData () {
295 295
     return new Promise(resolve => {
296 296
       const { posterData } = this.state
297 297
       if (posterData.qrcode) {
@@ -363,14 +363,14 @@ export default class Index extends Component {
363 363
     })
364 364
   }
365 365
 
366
-  handleTelClick(item, e) {
366
+  handleTelClick (item, e) {
367 367
     e.stopPropagation()
368 368
     Taro.makePhoneCall({
369 369
       phoneNumber: item.phone
370 370
     })
371 371
   }
372 372
 
373
-  handleChatClick(item, e) {
373
+  handleChatClick (item, e) {
374 374
     e.stopPropagation()
375 375
     const { userInfo: { person: { personId, nickname, name } } } = this.props
376 376
     Taro.navigateTo({
@@ -378,24 +378,24 @@ export default class Index extends Component {
378 378
     })
379 379
   }
380 380
 
381
-  handleConsuItemClick(item) {
381
+  handleConsuItemClick (item) {
382 382
     Taro.navigateTo({
383 383
       url: `/pages/card/index?id=${item.id}`
384 384
     })
385 385
   }
386 386
 
387
-  handleMoreClick() {
387
+  handleMoreClick () {
388 388
     // App.zhuge.track('查看置业顾问列表')
389 389
     Taro.navigateTo({
390 390
       url: `/pages/card/list/index?buildingId=${this.state.buildingId}`
391 391
     })
392 392
   }
393 393
 
394
-  handleStopPropagation(e) {
394
+  handleStopPropagation (e) {
395 395
     e.stopPropagation()
396 396
   }
397 397
 
398
-  toRecomonedPage() {
398
+  toRecomonedPage () {
399 399
     const {
400 400
       userInfo: { person: { personType } }
401 401
     } = this.props
@@ -411,50 +411,50 @@ export default class Index extends Component {
411 411
     }
412 412
   }
413 413
 
414
-  toHome() {
414
+  toHome () {
415 415
     Taro.switchTab({
416 416
       url: `/pages/project/index`
417 417
     })
418 418
   }
419 419
 
420
-  HandleCircumTabClick(id) {
420
+  HandleCircumTabClick (id) {
421 421
     this.setState({
422 422
       curTab: id
423 423
     })
424 424
   }
425 425
 
426
-  handleNewsMoreClick() {
426
+  handleNewsMoreClick () {
427 427
     Taro.navigateTo({
428 428
       url: `/pages/news/index?buildingId=` + this.state.buildingId
429 429
     })
430 430
   }
431 431
 
432
-  handNewsItemClick(id) {
432
+  handNewsItemClick (id) {
433 433
     Taro.navigateTo({
434 434
       url: '/pages/news/detail/index?id=' + id
435 435
     })
436 436
   }
437 437
 
438
-  handleActivityMoreClick() {
438
+  handleActivityMoreClick () {
439 439
     Taro.navigateTo({
440 440
       url: `/pages/activity/index?buildingId=` + this.state.buildingId
441 441
     })
442 442
   }
443 443
 
444
-  handActivityItemClick(item) {
444
+  handActivityItemClick (item) {
445 445
     Taro.navigateTo({
446 446
       url: '/pages/activity/detail/index?id=' + item.dynamicId
447 447
     })
448 448
   }
449 449
 
450
-  handlePreviewHxImage(current, urls) {
450
+  handlePreviewHxImage (current, urls) {
451 451
     Taro.previewImage({
452 452
       current,
453 453
       urls
454 454
     })
455 455
   }
456 456
 
457
-  handleFavor() {
457
+  handleFavor () {
458 458
     const { buildingId, isSaved } = this.state
459 459
     if (isSaved) {
460 460
       cancelFavorProject(buildingId).then(res => {
@@ -484,12 +484,12 @@ export default class Index extends Component {
484 484
       console.log('活动项目收藏')
485 485
     })
486 486
   }
487
-  handleToolsClick() {
487
+  handleToolsClick () {
488 488
     Taro.navigateTo({
489 489
       url: `/pages/toolKit/index`
490 490
     })
491 491
   }
492
-  moreFloor() {
492
+  moreFloor () {
493 493
     Taro.navigateTo({
494 494
       url: `/pages/project/floor/index`
495 495
     })
@@ -505,7 +505,7 @@ export default class Index extends Component {
505 505
     this.initPageData()
506 506
   }
507 507
 
508
-  renderBottomMenu() {
508
+  renderBottomMenu () {
509 509
     const { userInfo: { person: { personType } } } = this.props
510 510
     const { posterShow } = this.state
511 511
     return (
@@ -540,14 +540,14 @@ export default class Index extends Component {
540 540
     )
541 541
   }
542 542
 
543
-  previewHouseImage(current, urls) {
543
+  previewHouseImage (current, urls) {
544 544
     Taro.previewImage({
545 545
       current,
546 546
       urls
547 547
     })
548 548
   }
549 549
 
550
-  renderBuildingProjectTypeList() {
550
+  renderBuildingProjectTypeList () {
551 551
     const { statusOpts } = this.state
552 552
     const { projectDetail: { buildingProjectType = [], status, marketStatus } } = this.props
553 553
     return (
@@ -607,7 +607,7 @@ export default class Index extends Component {
607 607
   }
608 608
 
609 609
 
610
-  renderPhotoAlbum() {
610
+  renderPhotoAlbum () {
611 611
     const { projectDetail: { buildingApartment } } = this.props
612 612
     const list = buildingApartment.filter(item => item.apartmentType === 'photo')
613 613
     // const imgList = list.reduce((prev, cur) => {
@@ -668,7 +668,7 @@ export default class Index extends Component {
668 668
       </Block>
669 669
     )
670 670
   }
671
-  rendercircum() {
671
+  rendercircum () {
672 672
     const building = {
673 673
       ...this.props.projectDetail
674 674
     }
@@ -685,7 +685,7 @@ export default class Index extends Component {
685 685
     )
686 686
   }
687 687
 
688
-  renderConsuler() {
688
+  renderConsuler () {
689 689
     const { userInfo: { person: { phone } } } = this.props
690 690
     const { projectDetail: { consultants = [] } } = this.props
691 691
     return (
@@ -758,7 +758,7 @@ export default class Index extends Component {
758 758
     )
759 759
   }
760 760
 
761
-  renderStatement() {
761
+  renderStatement () {
762 762
     return (
763 763
       <View className='statement'>
764 764
         免责条款:以上价格仅供参考,具体一房一价的信息以售楼处展示为准。本网显示房屋位置、交通、医疗、教育、商业等配套信息,来源于第三方网络数据,不作为要约,仅供参考,双方具体权利义务应以法律规定及买卖合同约定为准。<br></br>本平台对项目周边文化教育的介绍旨在提供相关信息,并不意味着信息发布方对就学安排作出承诺。相关教育资源就学信息存在调整的可能,应以政府教育主管部门及办学颁布的政策规定为准。
@@ -767,7 +767,7 @@ export default class Index extends Component {
767 767
   }
768 768
 
769 769
 
770
-  renderHelp() {
770
+  renderHelp () {
771 771
     const { helpList } = this.state
772 772
     return (
773 773
       <Block>
@@ -788,17 +788,17 @@ export default class Index extends Component {
788 788
     )
789 789
   }
790 790
 
791
-  handleHelpClick(item) {
791
+  handleHelpClick (item) {
792 792
     Taro.navigateTo({
793 793
       url: '/pages/activity/detail/assistance?id=' + item.activityId
794 794
     })
795 795
   }
796
-  handleGroupClick(item) {
796
+  handleGroupClick (item) {
797 797
     Taro.navigateTo({
798 798
       url: '/pages/activity/detail/assemble?id=' + item.activityId
799 799
     })
800 800
   }
801
-  renderGroup() {
801
+  renderGroup () {
802 802
     const { groupList } = this.state
803 803
     return (
804 804
       <Block>
@@ -821,7 +821,7 @@ export default class Index extends Component {
821 821
     )
822 822
   }
823 823
 
824
-  renderHouseTypeList() {
824
+  renderHouseTypeList () {
825 825
     const { statusOpts, statusBgColors } = this.state
826 826
     const { projectDetail: { buildingApartment } } = this.props
827 827
     const list = buildingApartment.filter(item => item.apartmentType === 'apart')
@@ -869,7 +869,7 @@ export default class Index extends Component {
869 869
 
870 870
     )
871 871
   }
872
-  renderActivities() {
872
+  renderActivities () {
873 873
 
874 874
 
875 875
     const { activityList } = this.state
@@ -906,7 +906,7 @@ export default class Index extends Component {
906 906
       </Block>
907 907
     )
908 908
   }
909
-  renderNews() {
909
+  renderNews () {
910 910
     const { newsList } = this.state
911 911
     return (
912 912
       <Block>
@@ -938,7 +938,7 @@ export default class Index extends Component {
938 938
     )
939 939
   }
940 940
   // 开始播放
941
-  plagVideo() {
941
+  plagVideo () {
942 942
     let videoContext = wx.createVideoContext('myVideo')
943 943
     console.log()
944 944
     // this.setState({
@@ -946,26 +946,48 @@ export default class Index extends Component {
946 946
     // })
947 947
     videoContext.play()
948 948
   }
949
-  bindended(){
949
+  bindended () {
950 950
     let videoContext = wx.createVideoContext('myVideo')
951
-    console.log()
952
-    videoContext.seek(1)
951
+    console.log('111111')
952
+    // videoContext.stop()//停止
953
+    // videoContext.seek(1)//跳转
954
+    VideoContext.pause()//暂停
955
+  }
956
+  bindfullscreenchange = (e) => {
957
+
958
+    const { projectDetail } = this.props
959
+    const { videoImage } = projectDetail
960
+    const imgSrc = videoImage[0].url
961
+    console.log(e, '111111')
962
+
963
+    let videoContext = wx.createVideoContext('myVideo')
964
+    if (e.detail.fullScreen ) {
965
+      console.log(videoContext, '22222')
966
+videoContext.poster = undefined
967
+      console.log(videoContext, '22222')
968
+    }
969
+    else {
970
+      console.log(videoContext, '33333')
971
+      console.log(imgSrc, 'imgSrc')
972
+      videoContext.poster = imgSrc 
973
+      console.log(videoContext, '33333')
974
+    }
975
+    // VideoContext.pause()
976
+  }
977
+  onPlay = (e) => {
978
+    let videoContext = wx.createVideoContext('myVideo')
979
+    videoContext.poster = undefined
980
+    console.log(videoContext, '4444')
953 981
   }
954
-  // onPlay () {
955
-  //   console.log()
956
-  //   this.setState({
957
-  //     videoPlayShow: 'none'
958
-  //   })
959
-  // }
960 982
 
961 983
   // onPause() {
962 984
   //   this.setState({
963
-  //     videoPlayShow: 'flex'
985
+  //     videoPlayShow: 'flex'e.detail
964 986
   //   })
965 987
   // }
966 988
 
967 989
 
968
-  renderVideo() {
990
+  renderVideo () {
969 991
     const { videoPlayShow } = this.state
970 992
     const { projectDetail } = this.props
971 993
     const { videoImage } = projectDetail
@@ -985,16 +1007,18 @@ export default class Index extends Component {
985 1007
             height: '600rpx',
986 1008
             width: '750rpx'
987 1009
           }}
1010
+          // initialTime='1'
988 1011
           id='myVideo'
989 1012
           controls={true}
990
-          bindended={this.bindended}
1013
+          // bindended={this.bindended}
1014
+          onFullScreenChange={this.bindfullscreenchange}
991 1015
           // autoplay={false}
992 1016
           // initialTime='0'
993 1017
           // loop={true}
994 1018
           // muted={false}
995 1019
 
996
-          show-mute-btn='true'
997
-        // onPlay={this.onPlay}
1020
+          showMuteBtn='true'
1021
+        onPlay={this.onPlay}
998 1022
         // show-center-play-btn='false'
999 1023
         // onPause= {this.onPause}
1000 1024
 
@@ -1015,13 +1039,13 @@ export default class Index extends Component {
1015 1039
     )
1016 1040
   }
1017 1041
 
1018
-  changeCurrent(current) {
1042
+  changeCurrent (current) {
1019 1043
     this.setState({
1020 1044
       current: current + 1
1021 1045
     })
1022 1046
   }
1023 1047
 
1024
-  render() {
1048
+  render () {
1025 1049
     const { posterStatus, posterData, loaded, btnstate, grantPhoneVisible } = this.state
1026 1050
     const { projectDetail, userInfo } = this.props
1027 1051
     const { uvList = {} } = projectDetail