Parcourir la source

Merge branch 'v3.5.1' of http://git.ycjcjy.com/zhiyuxing/miniapp-v3 into v3.5.1

许静 il y a 5 ans
Parent
révision
a953fd45cc

+ 3
- 0
src/pages/checkin/index.js Voir le fichier

@@ -16,7 +16,10 @@ export default class checkin extends Component {
16 16
 
17 17
   componentWillMount () {
18 18
     const router = Taro.getStorageSync('router')
19
+    console.log('router---',router)
20
+    console.log('props---',this.props)
19 21
     const { id, type } = parseQueryString(router.query.params)
22
+    console.log('props---',id)
20 23
     this.setState({ id, type })
21 24
     this.getcheckinDetails(id, type)
22 25
   }

+ 6
- 2
src/pages/person/index.js Voir le fichier

@@ -191,8 +191,12 @@ export default class Person extends Component {
191 191
           </View>
192 192
           <View className='qiandao-con'>
193 193
             <Text className='qiandao-text'>签到得积分,积分兑好礼,马上去签到吧!</Text>
194
-            <View className={user.havaSigned ? 'reday-qiandao-btn' : 'qiandao-btn'} onClick={this.doSign}>{user.havaSigned ? '已签到' : '签到'}</View>
195
-
194
+            {/* <View className={user.havaSigned ? 'reday-qiandao-btn' : 'qiandao-btn'} onClick={this.doSign}>{user.havaSigned ? '已签到' : '签到'}</View> */}
195
+            {
196
+                user.havaSigned ?
197
+                  ( <View className='reday-qiandao-btn' onClick={this.doSign}> 已签到</View> ):
198
+                  (<View className="qiandao__btn" onClick={this.doSign}>签到</View>)
199
+              }
196 200
             {/* <Text className='integral-cont_btn' onClick={this.goShop}>去兑换</Text> */}
197 201
 
198 202
           </View>

+ 1
- 1
src/pages/project/album/index.js Voir le fichier

@@ -91,7 +91,7 @@ export default class Index extends Component {
91 91
           {imgList.map((item, index) => {
92 92
             console.log(item, '299999933333222')
93 93
             return (
94
-              <Image className='photos__item-img' src={getThumbnail(item.url)} mode='widthFix' onClick={this.previewImage.bind(this, item.url, _photosImgs)}></Image>
94
+              <Image className='photos__item-img' src={getThumbnail(item.url)} mode='aspectFill' onClick={this.previewImage.bind(this, item.url, _photosImgs)}></Image>
95 95
             )
96 96
           })}
97 97
         </View>

+ 56
- 57
src/pages/project/detail/index.js Voir le fichier

@@ -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,31 +387,31 @@ 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
     })
@@ -419,18 +419,18 @@ export default class Index extends Component {
419 419
 
420 420
   handActivityItemClick (item) {
421 421
     Taro.navigateTo({
422
-      url: '/pages/activity/detail/index?id=' +item.dynamicId
422
+      url: '/pages/activity/detail/index?id=' + item.dynamicId
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,7 +573,7 @@ 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 579
     // const imgList = list.reduce((prev, cur) => {
@@ -582,14 +582,14 @@ export default class Index extends Component {
582 582
     // }, [])
583 583
 
584 584
 
585
-
585
+    const listimg = list.filter(item => item.buildingImgList.length > 0)
586 586
 
587 587
 
588 588
     return (
589 589
 
590 590
 
591 591
       <Block> {console.log(list, 'list')}
592
-        {list.length > 0 &&
592
+        {listimg.length > 0 &&
593 593
           (
594 594
             <View className='photos__type'>
595 595
               <View className='photos__type__title'>相册</View>
@@ -597,7 +597,7 @@ export default class Index extends Component {
597 597
                 <View className='photos__type__content' onClick={this.toViewAlbum}>
598 598
 
599 599
                   <View className="around-tab">
600
-                    {list.map((item, index) => {
600
+                    {listimg.map((item, index) => {
601 601
                       const { apartmentName } = item
602 602
                       const buildingImgList = item.buildingImgList
603 603
                       const buildingImgUrl = buildingImgList.length > 0 ? buildingImgList[0].url : null
@@ -612,10 +612,9 @@ export default class Index extends Component {
612 612
 
613 613
                           <View>
614 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 style={{ textAlign: 'center' }}>({buildingImgList.length})</View>
615
+                            <View style={{ width: '218rpx', display: 'flex',justifyContent:'center'  }} >
616
+                              <View style={{  overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}> {apartmentName}  </View>
617
+                              <View> ({buildingImgList.length})</View>
619 618
                             </View>
620 619
                           </View>
621 620
                         </View>)}</View>
@@ -633,7 +632,7 @@ export default class Index extends Component {
633 632
       </Block>
634 633
     )
635 634
   }
636
-  rendercircum() {
635
+  rendercircum () {
637 636
     const building = {
638 637
       ...this.props.projectDetail
639 638
     }
@@ -650,7 +649,7 @@ export default class Index extends Component {
650 649
     )
651 650
   }
652 651
 
653
-  renderConsuler() {
652
+  renderConsuler () {
654 653
     const { userInfo: { person: { phone } } } = this.props
655 654
     const { projectDetail: { consultants = [] } } = this.props
656 655
     return (
@@ -723,7 +722,7 @@ export default class Index extends Component {
723 722
     )
724 723
   }
725 724
 
726
-  renderStatement() {
725
+  renderStatement () {
727 726
     return (
728 727
       <View className='statement'>
729 728
         免责条款:以上价格仅供参考,具体一房一价的信息以售楼处展示为准。本网显示房屋位置、交通、医疗、教育、商业等配套信息,来源于第三方网络数据,不作为要约,仅供参考,双方具体权利义务应以法律规定及买卖合同约定为准。<br></br>本平台对项目周边文化教育的介绍旨在提供相关信息,并不意味着信息发布方对就学安排作出承诺。相关教育资源就学信息存在调整的可能,应以政府教育主管部门及办学颁布的政策规定为准。
@@ -732,7 +731,7 @@ export default class Index extends Component {
732 731
   }
733 732
 
734 733
 
735
-  renderHelp() {
734
+  renderHelp () {
736 735
     const { helpList } = this.state
737 736
     return (
738 737
       <Block>
@@ -753,17 +752,17 @@ export default class Index extends Component {
753 752
     )
754 753
   }
755 754
 
756
-  handleHelpClick(item) {
755
+  handleHelpClick (item) {
757 756
     Taro.navigateTo({
758 757
       url: '/pages/activity/detail/assistance?id=' + item.activityId
759 758
     })
760 759
   }
761
-  handleGroupClick(item) {
760
+  handleGroupClick (item) {
762 761
     Taro.navigateTo({
763 762
       url: '/pages/activity/detail/assemble?id=' + item.activityId
764 763
     })
765 764
   }
766
-  renderGroup() {
765
+  renderGroup () {
767 766
     const { groupList } = this.state
768 767
     return (
769 768
       <Block>
@@ -786,7 +785,7 @@ export default class Index extends Component {
786 785
     )
787 786
   }
788 787
 
789
-  renderHouseTypeList() {
788
+  renderHouseTypeList () {
790 789
     const { statusOpts } = this.state
791 790
     const { projectDetail: { buildingApartment } } = this.props
792 791
     const list = buildingApartment.filter(item => item.apartmentType === 'apart')
@@ -904,7 +903,7 @@ export default class Index extends Component {
904 903
       </Block>
905 904
     )
906 905
   }
907
-  renderNews() {
906
+  renderNews () {
908 907
     const { newsList } = this.state
909 908
     return (
910 909
       <Block>
@@ -959,7 +958,7 @@ export default class Index extends Component {
959 958
   // }
960 959
 
961 960
 
962
-  renderVideo() {
961
+  renderVideo () {
963 962
     const { videoPlayShow } = this.state
964 963
     const { projectDetail } = this.props
965 964
     const { videoImage } = projectDetail
@@ -981,12 +980,12 @@ export default class Index extends Component {
981 980
           }}
982 981
           id='myVideo'
983 982
           controls={true}
984
-          // autoplay={false}
985
-          // initialTime='0'
986
-          // loop={true}
987
-          // muted={false}
983
+        // autoplay={false}
984
+        // initialTime='0'
985
+        // loop={true}
986
+        // muted={false}
988 987
 
989
-          show-mute-btn='true'
988
+        // show-mute-btn='true'
990 989
         // onPlay={this.onPlay}
991 990
         // show-center-play-btn='false'
992 991
         // onPause= {this.onPause}
@@ -1008,13 +1007,13 @@ export default class Index extends Component {
1008 1007
     )
1009 1008
   }
1010 1009
 
1011
-  changeCurrent(current) {
1010
+  changeCurrent (current) {
1012 1011
     this.setState({
1013 1012
       current: current + 1
1014 1013
     })
1015 1014
   }
1016 1015
 
1017
-  render() {
1016
+  render () {
1018 1017
     const { posterStatus, posterData, loaded, btnstate } = this.state
1019 1018
     const { projectDetail } = this.props
1020 1019
     const { uvList = {} } = projectDetail

+ 9
- 4
src/pages/project/index.js Voir le fichier

@@ -101,9 +101,14 @@ export default class Index extends Component {
101 101
       const payload = { location: `${location.longitude},${location.latitude}` }
102 102
 
103 103
       getLocationCity(payload).then(res => {
104
-        const curCity = res
105
-        this.updateCity(curCity)
106
-      }).catch(err=>{
104
+
105
+        let curCity = cityList.filter(item => {
106
+          return item.name == res.name
107
+        })
108
+
109
+        console.log('-----curCity-->', curCity)
110
+        this.updateCity(curCity[0] || defaultCity)
111
+      }).catch(err => {
107 112
         Taro.showToast({
108 113
           title: `定位错误: ${err.message}`,
109 114
           icon: 'none',
@@ -162,7 +167,7 @@ export default class Index extends Component {
162 167
   }
163 168
   loadBannerList () {
164 169
     const { curCity } = this.props
165
-    console.log(this.props,'this.props')
170
+    console.log(this.props, 'this.props')
166 171
     // 获取首页banner
167 172
     const payload = {
168 173
       showPosition: 'index'