瀏覽代碼

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

张延森 5 年之前
父節點
當前提交
0cfed0053a

+ 1
- 60
src/components/BackHomeBtn/index.js 查看文件

@@ -8,73 +8,14 @@ export default class Index extends Component {
8 8
   static defaultProps = {
9 9
     style: {}
10 10
   }
11
-  state ={
12
-    buttonTop: 0,
13
-    buttonLeft: 0,
14
-    windowHeight: '',
15
-    windowWidth: ''
16
-  }
17
-  componentDidShow(){
18
-    Taro.getSystemInfo({
19
-      success: function (res) {
20
-        console.log(res,"9999999999999")
21
-        realWindowWidth = res.windowWidth
22
-        realWindowHeight = res.windowHeight
23
-      }
24
-    })
25
-  
26
-  }
27
-
28 11
   handleClick() {
29 12
     Taro.switchTab({
30 13
       url: `/pages/project/index`
31 14
     })
32 15
   }
33
-  buttonStart=(e)=> {
34
-    console.log(e,"eeeeeeeeeeeee")
35
-    startPoint = e.touches[0]
36
-  }
37
-  buttonMove=(e)=> {
38
-    console.log(e,"888888888888888")
39
-    var endPoint = e.touches[e.touches.length - 1]
40
-    var translateX = endPoint.clientX - startPoint.clientX
41
-    var translateY = endPoint.clientY - startPoint.clientY
42
-    startPoint = endPoint
43
-    var buttonTop = this.state.buttonTop + translateY
44
-    var buttonLeft = this.state.buttonLeft + translateX
45
-    //判断是移动否超出屏幕
46
-    if (buttonLeft+50 >= this.state.windowWidth){
47
-      buttonLeft = this.state.windowWidth-50;
48
-    }
49
-    if (buttonLeft<=0){
50
-      buttonLeft=0;
51
-    }
52
-    if (buttonTop<=0){
53
-      buttonTop=0
54
-    }
55
-    if (buttonTop + 50 >= this.state.windowHeight){
56
-      buttonTop = this.state.windowHeight-50;
57
-    }
58
-    this.setState({
59
-      buttonTop: buttonTop,
60
-      buttonLeft: buttonLeft
61
-    })
62
-  }
63
-  buttonEnd=(e)=> {
64
-
65
-  }
66
-
67 16
   render() {
68 17
     return (
69
-      // <View className="back-home" style={this.props.style} onClick={this.handleClick}  >
70
-      //   <Image src={require('@assets/homeicon.png')} className='home-img'></Image>
71
-      //   <Text className="text">首页</Text>
72
-      // </View>
73
-      <View className="back-home"
74
-       style={this.props.style} 
75
-       style='top:{this.state.buttonTop}px;left:{this.state.buttonLeft}px'
76
-       onClick={this.handleClick} ontouchmove={this.buttonMove} ontouchstart={this.buttonStart} ontouchend={this.buttonEnd} >
77
-        {/* <Text className="iconfont icon-shouyeshouye"></Text> */}
18
+      <View className="back-home" style={this.props.style} onClick={this.handleClick}  >
78 19
         <Image src={require('@assets/homeicon.png')} className='home-img'></Image>
79 20
         <Text className="text">首页</Text>
80 21
       </View>

+ 9
- 7
src/pages/person/customerAnalysis/followUpCustomer/index.js 查看文件

@@ -42,19 +42,21 @@ export default class transactionCustomer extends Taro.Component {
42 42
 
43 43
   }
44 44
 
45
-  loadList = (page) => {
45
+  loadList(pageNumber) {
46 46
     const payload = {
47 47
       type: 'follow',
48
-      pageNumber: page,
48
+      pageNumber,
49 49
       pageSize: 10
50 50
     }
51 51
     queryCustomerList(payload.type, payload).then(res => {
52
-
52
+      const { records, list, total, current, pages } = res || {}
53
+      const _list = records || list || []
54
+      const newList = current <= 1 ? _list : this.state.customerList.concat(_list)
53 55
       this.setState({
54
-        customerList: res.records || [],
55
-        isEmpty: res.total == 0,
56
-        hasMore: res.current < res.page,
57
-        pageIndex: res.current >= res.pages ? res.pages : res.current
56
+        customerList: newList,
57
+        isEmpty: total == 0,
58
+        hasMore: current < pages,
59
+        pageIndex: current >= pages ? pages : current
58 60
       })
59 61
       Taro.hideLoading()
60 62
     })

+ 0
- 2
src/pages/person/customerAnalysis/index.scss 查看文件

@@ -6,8 +6,6 @@
6 6
   height:100vh;
7 7
 }
8 8
 
9
-
10
-
11 9
 .tab-box{
12 10
   .at-tabs__header{
13 11
     width: 86%;

+ 181
- 72
src/pages/person/customerAnalysis/myCustomer.js 查看文件

@@ -1,5 +1,6 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 import { AtTabs, AtTabsPane } from 'taro-ui'
3
+import ListView from '@components/ListView'
3 4
 import "taro-ui/dist/style/components/tabs.scss"
4 5
 import { savePoint, updatePoint } from '@services/common'
5 6
 import { getCustomerDetail, getVisitRecord, getActivityList, getFollowRecord, addFollowRecord, commitCustomerInfo } from '@services/person'
@@ -31,7 +32,15 @@ export default class myCustomer extends Taro.Component {
31 32
     followRecord: [],
32 33
     visitRecord: [],
33 34
     baseInfo: {}, // 完善信息弹框数据
34
-
35
+    hasMore: true,
36
+    isEmpty: false,
37
+    pageIndex: 1,
38
+    hasMore2: true,
39
+    isEmpty2: false,
40
+    pageIndex2: 1,
41
+    hasMore3: true,
42
+    isEmpty3: false,
43
+    pageIndex3: 1,
35 44
   }
36 45
 
37 46
   componentWillUnmount() {
@@ -45,57 +54,126 @@ export default class myCustomer extends Taro.Component {
45 54
       current: value
46 55
     })
47 56
     if (value == 1) {
48
-      this.queryVisitRecord();
57
+      this.queryVisitRecord(1);
49 58
     } else if (value == 2) {
50
-      this.queryActivityList();
59
+      this.queryActivityList(1);
51 60
     } else if (value == 3) {
52
-      this.queryFollowRecord();
61
+      this.queryFollowRecord(1);
53 62
     }
54 63
   }
64
+  // 访问记录上拉加载下拉刷新
65
+  onScrollToLower = async (fn) => {
66
+    const { pageIndex } = this.state;
67
+    this.queryVisitRecord(pageIndex + 1)
68
+    fn && fn();
69
+  }
70
+  onPullDownRefresh = (rest) => {
71
+    // debugger
72
+    if (this.refreshing) return
73
+    this.refreshing = true
74
+    this.queryVisitRecord(1)
75
+    rest && rest()
76
+    this.refreshing = false
77
+  }
78
+  // 活动信息上拉加载下拉刷新
79
+  onScrollToLower2 = async (fn) => {
80
+    const { pageIndex2 } = this.state;
81
+    this.queryActivityList(pageIndex2 + 1)
82
+    fn && fn();
83
+  }
84
+  onPullDownRefresh2 = (rest) => {
85
+    // debugger
86
+    if (this.refreshing) return
87
+    this.refreshing = true
88
+    this.queryActivityList(1)
89
+    rest && rest()
90
+    this.refreshing = false
91
+  }
92
+  // 跟进记录上拉加载下拉刷新
93
+  onScrollToLower3 = async (fn) => {
94
+    const { pageIndex3 } = this.state;
95
+    this.queryFollowRecord(pageIndex3 + 1)
96
+    fn && fn();
97
+  }
98
+  onPullDownRefresh3 = (rest) => {
99
+    // debugger
100
+    if (this.refreshing) return
101
+    this.refreshing = true
102
+    this.queryFollowRecord(1)
103
+    rest && rest()
104
+    this.refreshing = false
105
+  }
55 106
   // 获取访问记录
56
-  queryVisitRecord() {
107
+  queryVisitRecord(pageNumber) {
57 108
     const { customerId } = this.$router.params
58 109
     const payload = {
59
-      pageNumber: '0',
110
+      pageNumber,
60 111
       pageSize: '10',
61 112
       customerId,
62 113
     }
63 114
     getVisitRecord(payload).then(res => {
115
+      const { records, list, total, current, pages } = res || {}
116
+      const _list = records || list || []
117
+      const newList = current <= 1 ? _list : this.state.visitRecord.concat(_list)
64 118
       this.setState({
65
-        visitRecord: res.records || []
119
+        visitRecord: newList,
120
+        isEmpty: total == 0,
121
+        hasMore: current < pages,
122
+        pageIndex: current >= pages ? pages : current
66 123
       })
67 124
     })
68 125
   }
69 126
   // 获取活动信息
70
-  queryActivityList() {
127
+  queryActivityList(pageNumber) {
71 128
     const { customerId } = this.$router.params
72 129
     const payload = {
73
-      pageNumber: '0',
130
+      pageNumber,
74 131
       pageSize: '10',
75 132
       customerId,
76 133
     }
77 134
     getActivityList(payload).then(res => {
135
+      const { records, list, total, current, pages } = res || {}
136
+      const _list = records || list || []
137
+      const newList = current <= 1 ? _list : this.state.activityList.concat(_list)
78 138
       this.setState({
79
-        activityList: res.records || []
139
+        activityList: newList,
140
+        isEmpty2: total == 0,
141
+        hasMore2: current < pages,
142
+        pageIndex2: current >= pages ? pages : current
80 143
       })
81 144
     })
82 145
   }
83 146
   // 获取跟进记录
84
-  queryFollowRecord() {
147
+  queryFollowRecord(pageNumber) {
85 148
     const { customerId } = this.$router.params
86 149
     const payload = {
87
-      pageNumber: '0',
88
-      pageSize: '30',
150
+      pageNumber,
151
+      pageSize: '10',
89 152
       customerId,
90 153
     }
91 154
     getFollowRecord(payload).then(res => {
155
+      const { records, list, total, current, pages } = res || {}
156
+      const _list = records || list || []
157
+      const newList = current <= 1 ? _list : this.state.followRecord.concat(_list)
92 158
       this.setState({
93
-        followRecord: res.records
159
+        followRecord: newList,
160
+        isEmpty3: total == 0,
161
+        hasMore3: current < pages,
162
+        pageIndex3: current >= pages ? pages : current
94 163
       })
95 164
     })
96 165
   }
97 166
   componentDidShow() {
98 167
     this.loadList()
168
+    // Taro.getSystemInfo({
169
+    //   success: function (res) {
170
+    //     console.log(res, "9999999999999")
171
+    //     this.setState({
172
+    //       tabHeight: res.screenHeight - 380 + 'px'
173
+    //     })
174
+    //   },
175
+    // })
176
+
99 177
   }
100 178
   loadList() {
101 179
     const { customerId } = this.$router.params
@@ -145,7 +223,7 @@ export default class myCustomer extends Taro.Component {
145 223
       customerId,
146 224
     }
147 225
     addFollowRecord(params).then(res => {
148
-      this.queryFollowRecord()
226
+      this.queryFollowRecord(1)
149 227
     })
150 228
     this.setState({
151 229
       followVisible: false,
@@ -251,9 +329,6 @@ export default class myCustomer extends Taro.Component {
251 329
       }
252 330
     })
253 331
   }
254
-
255
-
256
-
257 332
   onChange = e => {
258 333
     this.setState({
259 334
       baseInfo: {
@@ -262,7 +337,6 @@ export default class myCustomer extends Taro.Component {
262 337
       }
263 338
     })
264 339
   }
265
-
266 340
   onBaseTextareaChange(e) {
267 341
     this.setState({
268 342
       baseInfo: {
@@ -283,7 +357,7 @@ export default class myCustomer extends Taro.Component {
283 357
       customerId: customer.customerId,
284 358
     }
285 359
     addFollowRecord(params).then(res => {
286
-      this.queryFollowRecord()
360
+      this.queryFollowRecord(1)
287 361
     })
288 362
     this.setState({
289 363
       followVisible: false,
@@ -371,7 +445,7 @@ export default class myCustomer extends Taro.Component {
371 445
   render() {
372 446
 
373 447
     const tabList = [{ title: '基本信息' }, { title: '访问记录' }, { title: '活动信息' }, { title: '跟进记录' }]
374
-    const { customerDetail, visitRecord, activityList, followRecord, followVisible, baseVisible, } = this.state
448
+    const { customerDetail, visitRecord, activityList, followRecord, followVisible, baseVisible, isEmpty, hasMore, isEmpty2, hasMore2, isEmpty3, hasMore3 } = this.state
375 449
     return (
376 450
       <View>
377 451
         {followVisible && this.renderFollowBox()}
@@ -390,7 +464,7 @@ export default class myCustomer extends Taro.Component {
390 464
           </View>
391 465
           <View onClick={this.handleTelClick.bind(this, customerDetail)} className='user__left__phone'>{customerDetail.phone}<View style={`background-image: url(${iconImg});background-size: 100%;background-position: 0rpx -88rpx;width: 44rpx;height: 44rpx;margin-left:10rpx`}></View></View>
392 466
         </View>
393
-        <AtTabs className="my-tab" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
467
+        <AtTabs height="calc(100vh - 400rpx)" className="my-tab" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
394 468
           <AtTabsPane current={this.state.current} index={0} >
395 469
             <View className="tab-pane1 pane">
396 470
               <View className="status">{customerDetail.status == 1 ? '报备' : customerDetail.status == 2 ? '到访' : customerDetail.status == 3 ? '认筹' : '签约'}</View>
@@ -404,69 +478,104 @@ export default class myCustomer extends Taro.Component {
404 478
           </AtTabsPane>
405 479
           <AtTabsPane current={this.state.current} index={1}>
406 480
             <View className="tab-pane2 pane">
407
-              {visitRecord.length && visitRecord.map(item => (
408
-                <View className="record-item">
409
-                  <View className="title" >{item.activity}</View>
410
-                  <View className="time">{dayjs(item.visitTime).format('YYYY年MM月DD日 HH:mm:ss') || ' '}</View>
411
-                </View>
412
-              ))
413
-              }
414
-              {!visitRecord.length &&
415
-                <View className="empty">
416
-                  <Image className="empty__img" mode="widthFix" src={emptyImg}></Image>
417
-                  <View className="empty__text">暂无访问记录~</View>
481
+              <ListView
482
+                className="wrap"
483
+                style="height:calc(100vh - 400rpx)"
484
+                needInit
485
+                isEmpty={isEmpty}
486
+                emptyText="暂无访问记录~"
487
+                hasMore={hasMore}
488
+                onPullDownRefresh={fn => this.onPullDownRefresh(fn)}
489
+                onScrollToLower={fn => this.onScrollToLower(fn)}
490
+              >
491
+                <View className="list">
492
+                  {visitRecord.length && visitRecord.map((item, index) => (
493
+                    <View className="record-item" key={index + 'follow'}>
494
+                      <View className="title" >{item.activity}</View>
495
+                      <View className="time">{dayjs(item.visitTime).format('YYYY年MM月DD日 HH:mm:ss') || ' '}</View>
496
+                    </View>
497
+                  ))
498
+                  }
499
+                  {!visitRecord.length &&
500
+                    <View className="empty">
501
+                      {/* <Image className="empty__img" mode="widthFix" src={emptyImg}></Image>
502
+                  <View className="empty__text">暂无访问记录~</View> */}
503
+                    </View>
504
+                  }
418 505
                 </View>
419
-              }
420
-
506
+              </ListView>
421 507
             </View>
422 508
           </AtTabsPane>
423 509
           <AtTabsPane current={this.state.current} index={2}>
424 510
             <View className="tab-pane3 pane">
425
-              {!activityList.length &&
426
-                <View className="empty">
427
-                  <Image className="empty__img" mode="widthFix" src={emptyImg}></Image>
428
-                  <View className="empty__text">暂无活动信息~</View>
511
+              <ListView
512
+                className="wrap"
513
+                style="height:calc(100vh - 400rpx)"
514
+                needInit
515
+                isEmpty={isEmpty2}
516
+                emptyText="暂无活动信息~"
517
+                hasMore={hasMore2}
518
+                onPullDownRefresh={fn => this.onPullDownRefresh2(fn)}
519
+                onScrollToLower={fn => this.onScrollToLower2(fn)}
520
+              >
521
+                <View className="list">
522
+                  {!activityList.length &&
523
+                    <View className="empty">
524
+                      {/* <Image className="empty__img" mode="widthFix" src={emptyImg}></Image>
525
+                  <View className="empty__text">暂无活动信息~</View> */}
526
+                    </View>
527
+                  }
528
+                  {activityList.length &&
529
+                    activityList.map(item => (
530
+                      <ActivityItem
531
+                        data={item}
532
+                        key={item.id + 'activity'}
533
+                        onClick={this.handleItemClick}>
534
+                      </ActivityItem>
535
+                    ))
536
+                  }
429 537
                 </View>
430
-              }
431
-              {activityList.length &&
432
-                activityList.map(item => (
433
-                  <ActivityItem
434
-                    data={item}
435
-                    key={item.id}
436
-                    onClick={this.handleItemClick}>
437
-                  </ActivityItem>
438
-                ))
439
-              }
538
+              </ListView>
440 539
             </View>
441 540
           </AtTabsPane>
442 541
           <AtTabsPane current={this.state.current} index={3}>
443
-            <View style="padding:10px 20px 120px 20px">
444
-              {followRecord.length && followRecord.map(item => (
445
-                <View>
446
-                  <View style=" display:flex;justify-content: space-between;align-items: center;color: #333;font-size: 16px; margin-bottom:20rpx;">
447
-                    <View style=" display: flex;align-items: center;"><View style="width:8px;height:8px;margin-right:20rpx;display:inline-block;background:rgba(246,182,29,1);border-radius: 50%;"></View>{item.recordType}</View>
448
-                    <View classNam="time" style=" font-size: 26rpx;color: #999;">{dayjs(item.createDate).format('YYYY年MM月DD日 HH:mm:ss') || ' '}</View>
449
-                  </View>
450
-                  {
451
-                    item.recordContent &&
452
-                    <View style="font-size:28rpx;color:#666;padding-left:32rpx;margin-bottom:20rpx;">
453
-                      {item.recordContent}
542
+            <View style="padding:10px 20px 20px 20px">
543
+              <ListView
544
+                className="wrap"
545
+                needInit
546
+                style="height:calc(100vh - 600rpx)"
547
+                isEmpty={isEmpty3}
548
+                emptyText="暂无跟进记录~"
549
+                hasMore={hasMore3}
550
+                onPullDownRefresh={fn => this.onPullDownRefresh3(fn)}
551
+                onScrollToLower={fn => this.onScrollToLower3(fn)} >
552
+                <View className="list">
553
+                  {followRecord.length && followRecord.map(item => (
554
+                    <View key={item.followUpRecordId + 'follow'}>
555
+                      <View style=" display:flex;justify-content: space-between;align-items: center;color: #333;font-size: 16px; margin-bottom:20rpx;">
556
+                        <View style=" display: flex;align-items: center;"><View style="width:8px;height:8px;margin-right:20rpx;display:inline-block;background:rgba(246,182,29,1);border-radius: 50%;"></View>{item.recordType}</View>
557
+                        <View classNam="time" style=" font-size: 26rpx;color: #999;">{dayjs(item.createDate).format('YYYY年MM月DD日 HH:mm:ss') || ' '}</View>
558
+                      </View>
559
+                      {
560
+                        item.recordContent &&
561
+                        <View style="font-size:28rpx;color:#666;padding-left:32rpx;margin-bottom:20rpx;">
562
+                          {item.recordContent}
563
+                        </View>
564
+                      }
565
+
566
+                    </View>
567
+                  ))
568
+                  }
569
+                  {!followRecord.length &&
570
+                    <View className="empty">
571
+                      {/* <Image className="empty__img" mode="widthFix" src={emptyImg}></Image>
572
+                  <View className="empty__text">暂无跟进记录~</View> */}
454 573
                     </View>
455 574
                   }
456
-
457
-                </View>
458
-              ))
459
-              }
460
-              {!followRecord.length &&
461
-                <View className="empty">
462
-                  <Image className="empty__img" mode="widthFix" src={emptyImg}></Image>
463
-                  <View className="empty__text">暂无跟进记录~</View>
464 575
                 </View>
465
-              }
466
-
467
-              <View className="btn" onClick={this.addFollow}>添加跟进</View>
576
+              </ListView>
577
+              <View className="btn" style="margin:40rpx auto;" onClick={this.addFollow}>添加跟进</View>
468 578
             </View>
469
-
470 579
           </AtTabsPane>
471 580
         </AtTabs>
472 581
       </View>

+ 12
- 9
src/pages/person/customerAnalysis/transactionCustomer/index.js 查看文件

@@ -29,21 +29,24 @@ export default class transactionCustomer extends Taro.Component {
29 29
   }
30 30
   componentDidShow() {
31 31
     Taro.showLoading()
32
-    this.loadList()
32
+    this.loadList(1)
33 33
 
34 34
   }
35
-  loadList() {
35
+  loadList(pageNumber) {
36 36
     const payload = {
37 37
       type: 'clinch',
38
-      pageNumber: 0,
38
+      pageNumber,
39 39
       pageSize: 9999
40 40
     }
41 41
     queryCustomerList(payload.type, payload).then(res => {
42
+      const { records, list, total, current, pages } = res || {}
43
+      const _list = records || list || []
44
+      const newList = current <= 1 ? _list : this.state.customerList.concat(_list)
42 45
       this.setState({
43
-        customerList: res.records || [],
44
-        isEmpty: res.total == 0,
45
-        hasMore: res.current < res.page,
46
-        pageIndex: res.current >= res.pages ? res.pages : res.current
46
+        customerList: newList,
47
+        isEmpty: total == 0,
48
+        hasMore: current < pages,
49
+        pageIndex: current >= pages ? pages : current
47 50
       })
48 51
       Taro.hideLoading()
49 52
     })
@@ -84,8 +87,8 @@ export default class transactionCustomer extends Taro.Component {
84 87
             }
85 88
             {
86 89
               customerList.length &&
87
-              customerList.map(item => (
88
-                <View class="item">
90
+              customerList.map((item, index) => (
91
+                <View class="item" key={index + 'transaction'}>
89 92
                   <Image src={item.picture || require('@assets/default-avatar.png')} className='img'></Image>
90 93
                   <View className="name">
91 94
                     {item.name}

+ 67
- 62
src/pages/project/detail/index.js 查看文件

@@ -57,7 +57,7 @@ export default class Index extends Component {
57 57
     albumCurrent: 0,
58 58
   }
59 59
 
60
-  componentWillMount () {
60
+  componentWillMount() {
61 61
     // const { id = '78c3dd489791dc1d29472fa344b08c45' } = this.$router.params
62 62
     ready.queue(() => {
63 63
       const router = Taro.getStorageSync('router')
@@ -90,12 +90,12 @@ export default class Index extends Component {
90 90
     })
91 91
   }
92 92
 
93
-  componentWillUnmount () {
93
+  componentWillUnmount() {
94 94
     const { recordId } = this.state
95 95
     recordId && updatePoint(recordId)
96 96
   }
97 97
 
98
-  loadHelpGroupList () {
98
+  loadHelpGroupList() {
99 99
     const { buildingId } = this.state
100 100
     queryHelpGroup({ buildingId: buildingId }).then(res => {
101 101
       console.log(res, "buildingId")
@@ -116,7 +116,7 @@ export default class Index extends Component {
116 116
     )
117 117
   }
118 118
 
119
-  loadDetail () {
119
+  loadDetail() {
120 120
     const { buildingId } = this.state
121 121
     const { dispatchProjectDetail } = this.props
122 122
     this.setState({
@@ -144,7 +144,7 @@ export default class Index extends Component {
144 144
     })
145 145
   }
146 146
 
147
-  loadActivityData () {
147
+  loadActivityData() {
148 148
     const { buildingId } = this.state
149 149
     const payload = { pageSize: 999, pageNumber: 1, buildingId }
150 150
     queryActivityList(payload).then(res => {
@@ -154,7 +154,7 @@ export default class Index extends Component {
154 154
     })
155 155
   }
156 156
 
157
-  loadNewsData () {
157
+  loadNewsData() {
158 158
     const { buildingId } = this.state
159 159
     const payload = { pageSize: 2, pageNumber: 1, buildingId }
160 160
     queryNewsList(payload).then(res => {
@@ -164,11 +164,11 @@ export default class Index extends Component {
164 164
     })
165 165
   }
166 166
 
167
-  navigateTo (url) {
167
+  navigateTo(url) {
168 168
     Taro.navigateTo({ url: url })
169 169
   }
170 170
   // 海报预览图
171
-  previewImage (arr) {
171
+  previewImage(arr) {
172 172
     // console.log('arr:' + arr)
173 173
     if (arr[0].length > 1) {
174 174
       Taro.previewImage({
@@ -195,7 +195,7 @@ export default class Index extends Component {
195 195
     })
196 196
   }
197 197
 
198
-  openMap () {
198
+  openMap() {
199 199
     const {
200 200
       buildingName,
201 201
       address,
@@ -222,12 +222,12 @@ export default class Index extends Component {
222 222
     })
223 223
   }
224 224
 
225
-  toViewAlbum () {
225
+  toViewAlbum() {
226 226
     const { buildingId } = this.state
227 227
     this.navigateTo(`/pages/project/album/index?id=${buildingId}`)
228 228
   }
229 229
 
230
-  onViewFans () {
230
+  onViewFans() {
231 231
     const { buildingId } = this.state
232 232
     this.navigateTo('/pages/card/fans/index?type=item&id=' + buildingId)
233 233
   }
@@ -256,7 +256,7 @@ export default class Index extends Component {
256 256
     }
257 257
   }
258 258
 
259
-  getPhoneNumber (e, item) {
259
+  getPhoneNumber(e, item) {
260 260
     getUserPhone(e, (phoneNumber) => {
261 261
       const { userInfo: { person: { personId, nickname, name } } } = this.props
262 262
       Taro.navigateTo({
@@ -265,7 +265,7 @@ export default class Index extends Component {
265 265
     })
266 266
   }
267 267
 
268
-  getPosterData () {
268
+  getPosterData() {
269 269
     return new Promise(resolve => {
270 270
       const { posterData } = this.state
271 271
       if (posterData.qrcode) {
@@ -336,14 +336,14 @@ export default class Index extends Component {
336 336
     })
337 337
   }
338 338
 
339
-  handleTelClick (item, e) {
339
+  handleTelClick(item, e) {
340 340
     e.stopPropagation()
341 341
     Taro.makePhoneCall({
342 342
       phoneNumber: item.phone
343 343
     })
344 344
   }
345 345
 
346
-  handleChatClick (item, e) {
346
+  handleChatClick(item, e) {
347 347
     e.stopPropagation()
348 348
     const { userInfo: { person: { personId, nickname, name } } } = this.props
349 349
     Taro.navigateTo({
@@ -351,24 +351,24 @@ export default class Index extends Component {
351 351
     })
352 352
   }
353 353
 
354
-  handleConsuItemClick (item) {
354
+  handleConsuItemClick(item) {
355 355
     Taro.navigateTo({
356 356
       url: `/pages/card/index?id=${item.id}`
357 357
     })
358 358
   }
359 359
 
360
-  handleMoreClick () {
360
+  handleMoreClick() {
361 361
     // App.zhuge.track('查看置业顾问列表')
362 362
     Taro.navigateTo({
363 363
       url: `/pages/card/list/index?buildingId=${this.state.buildingId}`
364 364
     })
365 365
   }
366 366
 
367
-  handleStopPropagation (e) {
367
+  handleStopPropagation(e) {
368 368
     e.stopPropagation()
369 369
   }
370 370
 
371
-  toRecomonedPage () {
371
+  toRecomonedPage() {
372 372
     const {
373 373
       userInfo: { person: { personType } }
374 374
     } = this.props
@@ -384,50 +384,50 @@ export default class Index extends Component {
384 384
     }
385 385
   }
386 386
 
387
-  toHome () {
387
+  toHome() {
388 388
     Taro.switchTab({
389 389
       url: `/pages/project/index`
390 390
     })
391 391
   }
392 392
 
393
-  HandleCircumTabClick (id) {
393
+  HandleCircumTabClick(id) {
394 394
     this.setState({
395 395
       curTab: id
396 396
     })
397 397
   }
398 398
 
399
-  handleNewsMoreClick () {
399
+  handleNewsMoreClick() {
400 400
     Taro.navigateTo({
401 401
       url: `/pages/news/index?buildingId=` + this.state.buildingId
402 402
     })
403 403
   }
404 404
 
405
-  handNewsItemClick (id) {
405
+  handNewsItemClick(id) {
406 406
     Taro.navigateTo({
407 407
       url: '/pages/news/detail/index?id=' + id
408 408
     })
409 409
   }
410 410
 
411
-  handleActivityMoreClick () {
411
+  handleActivityMoreClick() {
412 412
     Taro.navigateTo({
413 413
       url: `/pages/activity/index?buildingId=` + this.state.buildingId
414 414
     })
415 415
   }
416 416
 
417
-  handActivityItemClick (id) {
417
+  handActivityItemClick(id) {
418 418
     Taro.navigateTo({
419 419
       url: '/pages/activity/detail/index?id=' + id
420 420
     })
421 421
   }
422 422
 
423
-  handlePreviewHxImage (current, urls) {
423
+  handlePreviewHxImage(current, urls) {
424 424
     Taro.previewImage({
425 425
       current,
426 426
       urls
427 427
     })
428 428
   }
429 429
 
430
-  handleFavor () {
430
+  handleFavor() {
431 431
     const { buildingId, isSaved } = this.state
432 432
     if (isSaved) {
433 433
       cancelFavorProject(buildingId).then(res => {
@@ -457,18 +457,18 @@ export default class Index extends Component {
457 457
       console.log('活动项目收藏')
458 458
     })
459 459
   }
460
-  handleToolsClick () {
460
+  handleToolsClick() {
461 461
     Taro.navigateTo({
462 462
       url: `/pages/toolKit/index`
463 463
     })
464 464
   }
465
-  moreFloor () {
465
+  moreFloor() {
466 466
     Taro.navigateTo({
467 467
       url: `/pages/project/floor/index`
468 468
     })
469 469
   }
470 470
 
471
-  renderBottomMenu () {
471
+  renderBottomMenu() {
472 472
     const { userInfo: { person: { personType } } } = this.props
473 473
     const { posterShow } = this.state
474 474
     return (
@@ -503,14 +503,14 @@ export default class Index extends Component {
503 503
     )
504 504
   }
505 505
 
506
-  previewHouseImage (current, urls) {
506
+  previewHouseImage(current, urls) {
507 507
     Taro.previewImage({
508 508
       current,
509 509
       urls
510 510
     })
511 511
   }
512 512
 
513
-  renderBuildingProjectTypeList () {
513
+  renderBuildingProjectTypeList() {
514 514
     const { statusOpts } = this.state
515 515
     const { projectDetail: { buildingProjectType = [], status, marketStatus } } = this.props
516 516
     return (
@@ -535,7 +535,7 @@ export default class Index extends Component {
535 535
                         {/* <Icon className="iconfont icon-jinrongxianxingge-" onClick={this.handleToolsClick}></Icon> */}
536 536
                         <View className='row' style="margin-top:0">
537 537
                           <Text className='row-label'>项目类型:</Text>
538
-                          <Text className='row-txt black'>{item.buildingTypeName}</Text>
538
+                          <Text className='row-txt black'>{item.buildingTypeName || ' '}</Text>
539 539
                         </View>
540 540
                         <View className='row'>
541 541
                           <Text className='row-label'>项目参考价格:</Text>
@@ -545,10 +545,15 @@ export default class Index extends Component {
545 545
                         </View>
546 546
                         <View className='row'>
547 547
                           <Text className='row-label'>产权:</Text>
548
-                          <Text className='row-txt'>{item.rightsYear}年</Text>
548
+                          {item.rightsYear ?
549
+                            <Text className='row-txt'>{item.rightsYear}年</Text>
550
+                            :
551
+                            <Text className='row-txt'>暂无</Text>
552
+                          }
553
+
549 554
                           <View className='row-right'>
550 555
                             <Text className='row-label'>装修:</Text>
551
-                            <Text className='row-txt'>{item.decoration}</Text>
556
+                            <Text className='row-txt'>{item.decoration || '暂无'}</Text>
552 557
                           </View>
553 558
                         </View>
554 559
                       </View>
@@ -564,7 +569,7 @@ export default class Index extends Component {
564 569
   }
565 570
 
566 571
 
567
-  renderPhotoAlbum () {
572
+  renderPhotoAlbum() {
568 573
     const { projectDetail: { buildingApartment } } = this.props
569 574
     const list = buildingApartment.filter(item => item.apartmentType === 'photo')
570 575
     const imgList = list.reduce((prev, cur) => {
@@ -574,28 +579,28 @@ export default class Index extends Component {
574 579
 
575 580
     const { albumCurrent } = this.state
576 581
 
577
-  
578
-  
582
+
583
+
579 584
     return (
580 585
 
581
-   
586
+
582 587
       <Block>
583
-        { list.length > 0 &&
588
+        {list.length > 0 &&
584 589
           (
585 590
             <View className='photos__type'>
586 591
               <View className='photos__type__title'>相册</View>
587 592
               <ScrollView scrollX>
588 593
                 <View className='photos__type__content' onClick={this.toViewAlbum}>
589
-          
594
+
590 595
                   <View className="around-tab">
591 596
                     {list.map((item, index) => {
592
-                      const { apartmentName} = item || {}
593
-                      const  buildingImgList = item.buildingImgList
594
-                     
595
-                    
597
+                      const { apartmentName } = item || {}
598
+                      const buildingImgList = item.buildingImgList
599
+
600
+
596 601
                       return (
597 602
                         <View
598
-                          style={{ marginRight: '8px' }}                  
603
+                          style={{ marginRight: '8px' }}
599 604
                         >
600 605
                           {/* {`${label}(${num})`} */}
601 606
                           <View>
@@ -614,7 +619,7 @@ export default class Index extends Component {
614 619
       </Block>
615 620
     )
616 621
   }
617
-  rendercircum () {
622
+  rendercircum() {
618 623
     const building = {
619 624
       ...this.props.projectDetail
620 625
     }
@@ -631,7 +636,7 @@ export default class Index extends Component {
631 636
     )
632 637
   }
633 638
 
634
-  renderConsuler () {
639
+  renderConsuler() {
635 640
     const { userInfo: { person: { phone } } } = this.props
636 641
     const { projectDetail: { consultants = [] } } = this.props
637 642
     return (
@@ -685,7 +690,7 @@ export default class Index extends Component {
685 690
     )
686 691
   }
687 692
 
688
-  renderStatement () {
693
+  renderStatement() {
689 694
     return (
690 695
       <View className='statement'>
691 696
         免责条款:以上价格仅供参考,具体一房一价的信息以售楼处展示为准。本网显示房屋位置、交通、医疗、教育、商业等配套信息,来源于第三方网络数据,不作为要约,仅供参考,双方具体权利义务应以法律规定及买卖合同约定为准。<br></br>本平台对项目周边文化教育的介绍旨在提供相关信息,并不意味着信息发布方对就学安排作出承诺。相关教育资源就学信息存在调整的可能,应以政府教育主管部门及办学颁布的政策规定为准。
@@ -694,7 +699,7 @@ export default class Index extends Component {
694 699
   }
695 700
 
696 701
 
697
-  renderHelp () {
702
+  renderHelp() {
698 703
     const { helpList } = this.state
699 704
     return (
700 705
       <Block>
@@ -715,17 +720,17 @@ export default class Index extends Component {
715 720
     )
716 721
   }
717 722
 
718
-  handleHelpClick (item) {
723
+  handleHelpClick(item) {
719 724
     Taro.navigateTo({
720 725
       url: '/pages/activity/detail/assistance?id=' + item.activityId
721 726
     })
722 727
   }
723
-  handleGroupClick (item) {
728
+  handleGroupClick(item) {
724 729
     Taro.navigateTo({
725 730
       url: '/pages/activity/detail/assemble?id=' + item.activityId
726 731
     })
727 732
   }
728
-  renderGroup () {
733
+  renderGroup() {
729 734
     const { groupList } = this.state
730 735
     return (
731 736
       <Block>
@@ -747,7 +752,7 @@ export default class Index extends Component {
747 752
     )
748 753
   }
749 754
 
750
-  renderHouseTypeList () {
755
+  renderHouseTypeList() {
751 756
     const { statusOpts } = this.state
752 757
     const { projectDetail: { buildingApartment } } = this.props
753 758
     const list = buildingApartment.filter(item => item.apartmentType === 'apart')
@@ -795,7 +800,7 @@ export default class Index extends Component {
795 800
 
796 801
     )
797 802
   }
798
-  renderActivities () {
803
+  renderActivities() {
799 804
     const { activityList } = this.state
800 805
     return (
801 806
       <Block>
@@ -826,7 +831,7 @@ export default class Index extends Component {
826 831
       </Block>
827 832
     )
828 833
   }
829
-  renderNews () {
834
+  renderNews() {
830 835
     const { newsList } = this.state
831 836
     return (
832 837
       <Block>
@@ -858,7 +863,7 @@ export default class Index extends Component {
858 863
     )
859 864
   }
860 865
 
861
-  renderVideo () {
866
+  renderVideo() {
862 867
     const { projectDetail } = this.props
863 868
     return (
864 869
       <View
@@ -876,7 +881,7 @@ export default class Index extends Component {
876 881
           }}
877 882
           controls={true}
878 883
           autoplay={false}
879
-        
884
+
880 885
           initialTime='0'
881 886
           id='video'
882 887
           loop={false}
@@ -887,7 +892,7 @@ export default class Index extends Component {
887 892
     )
888 893
   }
889 894
 
890
-  changeCurrent (current) {
895
+  changeCurrent(current) {
891 896
     this.setState({
892 897
       current: current + 1
893 898
     })
@@ -895,7 +900,7 @@ export default class Index extends Component {
895 900
 
896 901
 
897 902
 
898
-  render () {
903
+  render() {
899 904
     const { posterStatus, posterData, loaded, btnstate } = this.state
900 905
     const { projectDetail } = this.props
901 906
     const { uvList = {} } = projectDetail
@@ -928,7 +933,7 @@ export default class Index extends Component {
928 933
 
929 934
               {btnstate === 1 && projectDetail.videoUrl != null && this.renderVideo()}
930 935
 
931
-        
936
+
932 937
               {btnstate === 1 && projectDetail.videoUrl != null && (<View className='media-btn'>
933 938
                 <View className='video-btn' style={{ background: ' rgba(187, 156, 121, 1)', color: 'rgba(255, 255, 255, 1)' }} >视频</View>
934 939
                 <View className='img-btn' onClick={() => this.setState({ btnstate: 0 })}>图片</View>
@@ -967,7 +972,7 @@ export default class Index extends Component {
967 972
                       <View className='row project__addr'>
968 973
                         <Text className="label">楼盘地址:</Text>
969 974
                         <View className='address'>
970
-                          <Text className="address__text">{projectDetail.address}</Text>
975
+                          <Text className="address__text">{projectDetail.address || '暂无'}</Text>
971 976
                           {/* <Text className='iconfont icon-jingzhundaohang-copy' onClick={this.openMap.bind(this)}></Text> */}
972 977
                         </View>
973 978
                       </View>