浏览代码

首页资讯公告、盘客工具拆分

许静 5 年前
父节点
当前提交
61aea4d0ab

+ 1
- 0
src/app.js 查看文件

49
       'pages/activity/myActivity',
49
       'pages/activity/myActivity',
50
       'pages/person/index',
50
       'pages/person/index',
51
       'pages/person/customerAnalysis/index',
51
       'pages/person/customerAnalysis/index',
52
+      'pages/person/customerAnalysis/analysis',
52
       'pages/person/profile/index',
53
       'pages/person/profile/index',
53
       'pages/person/profile/detail/index',
54
       'pages/person/profile/detail/index',
54
       'pages/project/detail/index',
55
       'pages/project/detail/index',

+ 1
- 1
src/pages/person/customerAnalysis/analysis.js 查看文件

18
 export default class analysis extends Taro.Component {
18
 export default class analysis extends Taro.Component {
19
 
19
 
20
   config = {
20
   config = {
21
-    navigationBarTitleText: ''
21
+    navigationBarTitleText: '客户分析'
22
   }
22
   }
23
 
23
 
24
   state = {
24
   state = {

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

59
   }
59
   }
60
 
60
 
61
   render() {
61
   render() {
62
-    const tabList = [{ title: '我的客户' },{ title: '客户分析' }]
62
+  
63
     const { customerNum, current } = this.state
63
     const { customerNum, current } = this.state
64
     return (
64
     return (
65
-      <AtTabs  className="tab-box overflow-tab" current={current} tabList={tabList} onClick={this.handleClick.bind(this)} swipeable={false}>
66
-         <AtTabsPane current={current} index={0}>
65
+      // <AtTabs  className="tab-box overflow-tab" current={current} tabList={tabList} onClick={this.handleClick.bind(this)} swipeable={false}>
66
+      //    <AtTabsPane current={current} index={0}>
67
           <View style="padding:10px 20px; display: flex;flex-wrap: wrap;align-content: flex-start;justify-content: space-between;">
67
           <View style="padding:10px 20px; display: flex;flex-wrap: wrap;align-content: flex-start;justify-content: space-between;">
68
             <View className="my-customer" onClick={this.toFollowUpCustomer} style="border-right:1px solid rgba(0,0,0,0.12)">
68
             <View className="my-customer" onClick={this.toFollowUpCustomer} style="border-right:1px solid rgba(0,0,0,0.12)">
69
               <Image mode="widthFix" src={require('@assets/person/genjin.png')} className='img'></Image>
69
               <Image mode="widthFix" src={require('@assets/person/genjin.png')} className='img'></Image>
76
               <View className="name">{customerNum.clinchSum || 0}人</View>
76
               <View className="name">{customerNum.clinchSum || 0}人</View>
77
             </View>
77
             </View>
78
           </View>
78
           </View>
79
-        </AtTabsPane>
80
-        <AtTabsPane current={current} index={1} >
81
-          <View >
82
-            {
83
-              current != 0 && <Analysis></Analysis>
84
-            }
85
-          </View>
86
-        </AtTabsPane>
79
+      //   </AtTabsPane>
80
+      //   <AtTabsPane current={current} index={1} >
81
+      //     <View >
82
+      //       {
83
+      //         current != 0 && <Analysis></Analysis>
84
+      //       }
85
+      //     </View>
86
+      //   </AtTabsPane>
87
        
87
        
88
-      </AtTabs>
88
+      // </AtTabs>
89
     )
89
     )
90
   }
90
   }
91
 }
91
 }

+ 50
- 42
src/pages/person/customerAnalysis/index.scss 查看文件

5
   position: relative;
5
   position: relative;
6
   height:100vh;
6
   height:100vh;
7
 }
7
 }
8
+.my-customer{
9
+  flex: 0 0 50%;
10
+  text-align: center;
11
+  border-bottom: 2px solid rgba(216,216,216,1);
12
+  padding: 80px 0;
13
+  
14
+  .img{
15
+    width: 76px;
16
+  }
17
+  .name{
18
+    color: #333;
19
+    font-size: 30px;
20
+    line-height: 48px;
21
+  }
22
+
23
+}
24
+
25
+
26
+
27
+
28
+
29
+
30
+
8
 .daily-month{
31
 .daily-month{
9
   display: flex;
32
   display: flex;
10
   align-items: center;
33
   align-items: center;
67
   .at-tabs__underline{
90
   .at-tabs__underline{
68
     height: 0!important;
91
     height: 0!important;
69
   }
92
   }
70
-  .my-customer{
71
-    flex: 0 0 50%;
72
-    text-align: center;
73
-    border-bottom: 2px solid rgba(216,216,216,1);
74
-    padding: 80px 0;
75
-    
76
-    .img{
77
-      width: 76px;
78
-    }
79
-    .name{
80
-      color: #333;
81
-      font-size: 30px;
82
-      line-height: 48px;
83
-    }
84
-
85
 
93
 
94
+ 
95
+}
96
+.tab-bar{
97
+  margin-top: 30px;
98
+  .at-tabs__header{
99
+    width: 80%;
100
+    background-color: none;
101
+    box-shadow:none;
102
+    margin: 0 auto;
103
+    border-radius: 0;
104
+    border: none;
86
   }
105
   }
87
-  .tab-bar{
88
-    margin-top: 30px;
89
-    .at-tabs__header{
90
-      width: 80%;
91
-      background-color: none;
92
-      box-shadow:none;
93
-      margin: 0 auto;
94
-      border-radius: 0;
95
-      border: none;
96
-    }
97
-    .at-tabs__item{
98
-      width:33.333%;
99
-      flex: none;
100
-      color: #666;
101
-      font-size: 28px;
102
-      padding: 12px 20px;
103
-    }
104
-    .at-tabs__item--active{
105
-      color: $primary-color;
106
-      background-color: #fff;
107
-    }
108
-    .at-tabs__item-underline{
109
-      height: 4px;
110
-      background-color: $primary-color;
111
-      width: 60%;
112
-      margin-left: 20%;
113
-    }
106
+  .at-tabs__item{
107
+    width:33.333%;
108
+    flex: none;
109
+    color: #666;
110
+    font-size: 28px;
111
+    padding: 12px 20px;
112
+  }
113
+  .at-tabs__item--active{
114
+    color: $primary-color;
115
+    background-color: #fff;
116
+  }
117
+  .at-tabs__item-underline{
118
+    height: 4px;
119
+    background-color: $primary-color;
120
+    width: 60%;
121
+    margin-left: 20%;
114
   }
122
   }
115
 }
123
 }
116
 .overflow-tab{
124
 .overflow-tab{

+ 9
- 0
src/pages/person/menus.js 查看文件

16
   client: require('@assets/mine/client.png'),
16
   client: require('@assets/mine/client.png'),
17
   consultant: require('@assets/mine/consultant.png'),
17
   consultant: require('@assets/mine/consultant.png'),
18
   customerAnalysis: require('@assets/mine/customerAnalysis.png'),
18
   customerAnalysis: require('@assets/mine/customerAnalysis.png'),
19
+  fenxi: require('@assets/mine/fenxi.png'),
19
 }
20
 }
20
 
21
 
21
 const DRIFT = ROLE_CODE['DRIFT']
22
 const DRIFT = ROLE_CODE['DRIFT']
49
       userTypes: [CONSULTANT],
50
       userTypes: [CONSULTANT],
50
       style: '',
51
       style: '',
51
     },
52
     },
53
+    {
54
+      name: '客户分析',
55
+      url: '/pages/person/customerAnalysis/analysis',
56
+      icon: icons.fenxi,
57
+      extends: undefined,
58
+      userTypes: [CONSULTANT],
59
+      style: '',
60
+    },
52
     // {
61
     // {
53
     //   name: '成为经纪人',
62
     //   name: '成为经纪人',
54
     //   url: '/pages/agent/become/index',
63
     //   url: '/pages/agent/become/index',

+ 66
- 29
src/pages/project/index.js 查看文件

6
 import HelpGroupBanner from './swiper'
6
 import HelpGroupBanner from './swiper'
7
 import ActivityItem from '../activity/item'
7
 import ActivityItem from '../activity/item'
8
 
8
 
9
-
10
 import ready from '@utils/ready'
9
 import ready from '@utils/ready'
11
 import { getLocationCity } from '@services/map'
10
 import { getLocationCity } from '@services/map'
12
 
11
 
51
     achieve: false
50
     achieve: false
52
   }
51
   }
53
 
52
 
54
-  componentWillMount () {
53
+  componentWillMount() {
55
     this.qqmapsdk = new QQMapWX({
54
     this.qqmapsdk = new QQMapWX({
56
       key: 'TIIBZ-ZJG33-52T3L-Y3X4Q-NWKLV-KUB3B'
55
       key: 'TIIBZ-ZJG33-52T3L-Y3X4Q-NWKLV-KUB3B'
57
     })
56
     })
74
     })
73
     })
75
   }
74
   }
76
 
75
 
77
-  componentDidShow () {
76
+  componentDidShow() {
78
     if (this.props.curCity.id) {
77
     if (this.props.curCity.id) {
79
       ready.queue(() => {
78
       ready.queue(() => {
80
         this.loadData()
79
         this.loadData()
82
     }
81
     }
83
   }
82
   }
84
 
83
 
85
-  componentWillUnmount () {
84
+  componentWillUnmount() {
86
     const { recordId } = this.state
85
     const { recordId } = this.state
87
     recordId && updatePoint(recordId)
86
     recordId && updatePoint(recordId)
88
   }
87
   }
89
 
88
 
90
-  getLocation () {
89
+  getLocation() {
91
     const { cityList, userInfo: { person: { org } } } = this.props
90
     const { cityList, userInfo: { person: { org } } } = this.props
92
     let defaultCity = cityList.filter(item => {
91
     let defaultCity = cityList.filter(item => {
93
       return item.id == org.defaultCityId
92
       return item.id == org.defaultCityId
103
       const payload = { location: `${location.longitude},${location.latitude}` }
102
       const payload = { location: `${location.longitude},${location.latitude}` }
104
 
103
 
105
       getLocationCity(payload).then(res => {
104
       getLocationCity(payload).then(res => {
106
-      
105
+
107
         let curCity = cityList.filter(item => {
106
         let curCity = cityList.filter(item => {
108
           return item.name == res.name || ''
107
           return item.name == res.name || ''
109
         })
108
         })
134
       this.updateCity(defaultCity)
133
       this.updateCity(defaultCity)
135
     })
134
     })
136
   }
135
   }
137
-  updateCity (payload) {
136
+  updateCity(payload) {
138
     this.props.dispatchCitySelected(payload).then(res => {
137
     this.props.dispatchCitySelected(payload).then(res => {
139
       this.loadData()
138
       this.loadData()
140
     })
139
     })
141
   }
140
   }
142
 
141
 
143
-  loadData () {
142
+  loadData() {
144
     this.loadBannerList()
143
     this.loadBannerList()
145
     this.loadHelpGroupList()
144
     this.loadHelpGroupList()
146
     this.loadNewsList()
145
     this.loadNewsList()
148
     this.loadList()
147
     this.loadList()
149
   }
148
   }
150
 
149
 
151
-  loadOpenScreenBanner () {
150
+  loadOpenScreenBanner() {
152
     const payload = {
151
     const payload = {
153
       // showPosition: 'index'
152
       // showPosition: 'index'
154
     }
153
     }
166
       })
165
       })
167
     })
166
     })
168
   }
167
   }
169
-  loadBannerList () {
168
+  loadBannerList() {
170
     const { curCity } = this.props
169
     const { curCity } = this.props
171
     console.log(this.props, 'this.props')
170
     console.log(this.props, 'this.props')
172
     // 获取首页banner
171
     // 获取首页banner
189
     })
188
     })
190
   }
189
   }
191
 
190
 
192
-  loadHelpGroupList () {
191
+  loadHelpGroupList() {
193
     queryHelpGroup({ cityId: this.props.curCity.id, buildingId: '' }).then(res => {
192
     queryHelpGroup({ cityId: this.props.curCity.id, buildingId: '' }).then(res => {
194
       console.log(res, "res")
193
       console.log(res, "res")
195
       this.setState({
194
       this.setState({
200
   }
199
   }
201
 
200
 
202
 
201
 
203
-  loadNewsList () {
202
+  loadNewsList() {
204
     const { curCity } = this.props
203
     const { curCity } = this.props
205
     const payload = {
204
     const payload = {
206
       pageNumber: 1,
205
       pageNumber: 1,
207
-      pageSize: 2
206
+      pageSize: 999
208
     }
207
     }
209
     if (curCity.id) {
208
     if (curCity.id) {
210
       payload.cityId = curCity.id
209
       payload.cityId = curCity.id
216
     })
215
     })
217
   }
216
   }
218
 
217
 
219
-  loadActivityList () {
218
+  loadActivityList() {
220
     const { curCity } = this.props
219
     const { curCity } = this.props
221
     const payload = {
220
     const payload = {
222
       pageNumber: 1,
221
       pageNumber: 1,
234
     })
233
     })
235
   }
234
   }
236
 
235
 
237
-  loadList () {
236
+  loadList() {
238
     const { keywords } = this.state
237
     const { keywords } = this.state
239
     const { curCity } = this.props
238
     const { curCity } = this.props
240
 
239
 
288
     }
287
     }
289
   }
288
   }
290
 
289
 
291
-  onViewDetail (item) {
290
+  onViewDetail(item) {
292
     Taro.navigateTo({
291
     Taro.navigateTo({
293
       url: `/pages/project/detail/index?id=${item.buildingId}`
292
       url: `/pages/project/detail/index?id=${item.buildingId}`
294
     })
293
     })
299
     this.redirectTo(item)
298
     this.redirectTo(item)
300
   }
299
   }
301
 
300
 
302
-  redirectTo ({ targetId, contentType, buildingId } = {}) {
301
+  redirectTo({ targetId, contentType, buildingId } = {}) {
303
     switch (contentType) {
302
     switch (contentType) {
304
       // 项目
303
       // 项目
305
       case 'project':
304
       case 'project':
344
     }
343
     }
345
   }
344
   }
346
 
345
 
347
-  handleHelpGroupClick (item) {
346
+  handleHelpGroupClick(item) {
348
     if (item.type == 1) {
347
     if (item.type == 1) {
349
       Taro.navigateTo({
348
       Taro.navigateTo({
350
         url: '/pages/activity/detail/assistance?id=' + item.activityId
349
         url: '/pages/activity/detail/assistance?id=' + item.activityId
356
     }
355
     }
357
   }
356
   }
358
 
357
 
359
-  handleMaskClose () {
358
+  handleMaskClose() {
360
     this.setState({
359
     this.setState({
361
       maskVisible: false
360
       maskVisible: false
362
     })
361
     })
381
     })
380
     })
382
   }
381
   }
383
 
382
 
384
-  handleMaskBannerClick (data) {
383
+  handleMaskBannerClick(data) {
385
     this.redirectTo(data)
384
     this.redirectTo(data)
386
   }
385
   }
387
 
386
 
388
-  handleLocationClick () {
387
+  handleLocationClick() {
389
     Taro.navigateTo({
388
     Taro.navigateTo({
390
       url: `/pages/city/index`
389
       url: `/pages/city/index`
391
     })
390
     })
392
   }
391
   }
393
 
392
 
394
-  handleToHouseList () {
393
+  handleToHouseList() {
395
     Taro.navigateTo({
394
     Taro.navigateTo({
396
       url: '/pages/project/list/index'
395
       url: '/pages/project/list/index'
397
     })
396
     })
398
   }
397
   }
399
 
398
 
400
-  handleProItemClick () {
399
+  handleProItemClick() {
401
     Taro.navigateTo({
400
     Taro.navigateTo({
402
       url: '/pages/project/list/index'
401
       url: '/pages/project/list/index'
403
     })
402
     })
407
   // CHANNEL_AGENT: 'channel agent', // 渠道经纪人
406
   // CHANNEL_AGENT: 'channel agent', // 渠道经纪人
408
   // DRIFT: 'drift', // 游客
407
   // DRIFT: 'drift', // 游客
409
   // CUSTOMER: 'customer' // 客户
408
   // CUSTOMER: 'customer' // 客户
410
-  toRecomonedPage () {
409
+  toRecomonedPage() {
411
     const {
410
     const {
412
       userInfo: { person: { personType } }
411
       userInfo: { person: { personType } }
413
     } = this.props
412
     } = this.props
428
       console.log(this.props.curCity.id, "this.props.curCity.id")
427
       console.log(this.props.curCity.id, "this.props.curCity.id")
429
     }
428
     }
430
   }
429
   }
431
-  toMapHouse () {
430
+  toMapHouse() {
432
     Taro.navigateTo({
431
     Taro.navigateTo({
433
       url: `/pages/project/map/index`
432
       url: `/pages/project/map/index`
434
     })
433
     })
435
   }
434
   }
436
 
435
 
437
-  handleAuthPhoneSuccess (curCity) {
436
+  handleAuthPhoneSuccess(curCity) {
438
 
437
 
439
     console.log(curCity, 'curCity')
438
     console.log(curCity, 'curCity')
440
 
439
 
444
   }
443
   }
445
 
444
 
446
 
445
 
447
-  renderProjectList () {
446
+  renderProjectList() {
448
     const { proList: { records = [] } } = this.props
447
     const { proList: { records = [] } } = this.props
449
     const { helpGroupList } = this.state
448
     const { helpGroupList } = this.state
450
     const list = records.filter(item => item.isMain === 1)
449
     const list = records.filter(item => item.isMain === 1)
504
     )
503
     )
505
   }
504
   }
506
 
505
 
507
-  renderMaskBanner () {
506
+  renderMaskBanner() {
508
     const { maskBanner } = this.state
507
     const { maskBanner } = this.state
509
     return (
508
     return (
510
       <View className="mask-banner">
509
       <View className="mask-banner">
520
       </View>
519
       </View>
521
     )
520
     )
522
   }
521
   }
522
+  changeCurrent(event) {
523
 
523
 
524
+    const current = event.detail.current
525
+    this.props.onChange && this.props.onChange(current)
526
+  }
524
 
527
 
525
-  render () {
528
+  render() {
526
     const { curCity } = this.props
529
     const { curCity } = this.props
527
     const { newsList, achieve } = this.state
530
     const { newsList, achieve } = this.state
528
     const { userInfo: { person: { personType, phone } } } = this.props
531
     const { userInfo: { person: { personType, phone } } } = this.props
529
     const { userInfo: { person } } = this.props
532
     const { userInfo: { person } } = this.props
533
+
530
     return (
534
     return (
531
       <Block>
535
       <Block>
532
         {this.state.loaded && (
536
         {this.state.loaded && (
584
 
588
 
585
 
589
 
586
               </View>
590
               </View>
591
+              {
592
+                newsList.length &&
593
+                <View style="background-color:#fff">
594
+                  <View className="notice-box">
595
+                    <View style="  display: flex;align-items: center;">
596
+                      <Image className="notice-icon" src={require('@assets/notice.png')}></Image>
597
+                      <Swiper
598
+                        className='notice-swiper'
599
+                        circular
600
+                        autoplay
601
+                        interval="3000"
602
+                        onChange={this.changeCurrent.bind(this)}
603
+                        vertical="true"
604
+                      >
605
+                        {
606
+                          newsList.map((list, inx) => {
607
+                            return (
608
+                              <SwiperItem key={`img-${inx}`}>
609
+                                <View className="notice-text">
610
+                                  {list.newsName}
611
+                                </View>
612
+                              </SwiperItem>
613
+                            )
614
+                          })
615
+                        }
616
+                      </Swiper>
617
+                    </View>
618
+                    <View className="notice-more">
619
+                      更多 <Text className="iconfont icon-more"></Text>
620
+                    </View>
621
+                  </View>
622
+                </View>
623
+              }
587
 
624
 
588
 
625
 
589
               {/* 推荐楼盘 */}
626
               {/* 推荐楼盘 */}

+ 38
- 1
src/pages/project/index.scss 查看文件

101
     }
101
     }
102
   }
102
   }
103
 }
103
 }
104
+.notice-box{
105
+  display: flex;
106
+  align-items: center;
107
+  justify-content: space-between;
108
+  margin: 30px;
109
+  height:80px;
110
+  background:#fff;
111
+  box-shadow:0px 2px 10px 0px rgba(0,0,0,0.12);
112
+  padding: 0 20px;
113
+  .notice-icon{
114
+    width: 40px ;
115
+    height: 32px;
116
+    margin-right: 20px;
117
+    
118
+  }
119
+  .notice-swiper{
120
+    height: 80px;
121
+    width: 500px;
122
+    line-height: 80px;
123
+    .notice-text{
124
+      font-size: 28px;
125
+      color: #888888;
126
+      width: 450px;
127
+      @include text-ellipsis;
128
+    }
129
+  }
130
+ 
131
+  .notice-more {
132
+    font-size: 26px;
133
+    color: $text-color-lighter;
134
+
135
+    .iconfont {
136
+      font-size: 26px;
137
+      color: $text-color-lighter;
138
+    }
139
+  }
140
+}
104
 
141
 
105
 .section-top {
142
 .section-top {
106
   position: relative;
143
   position: relative;
107
   padding: 0 0px;
144
   padding: 0 0px;
108
-  box-shadow:0px 2px 12px 2px rgba(29,29,29,0.09);
145
+  // box-shadow:0px 2px 12px 2px rgba(29,29,29,0.09);
109
 }
146
 }
110
 
147
 
111
 .sectionn-news-list {
148
 .sectionn-news-list {