xujing 5 gadus atpakaļ
vecāks
revīzija
abe8954e4d

+ 2
- 1
src/app.js Parādīt failu

@@ -41,10 +41,11 @@ class App extends Component {
41 41
     },
42 42
     pages: [
43 43
       'pages/project/index',
44
-      'pages/project/middlePage',
44
+      'pages/project/h5Page',
45 45
       'pages/person/customerAnalysis/followUpCustomer/index',
46 46
       'pages/person/customerAnalysis/transactionCustomer/index',
47 47
       'pages/person/customerAnalysis/myCustomer',
48
+      'pages/person/accessRecord',
48 49
       'pages/shop/index',
49 50
       'pages/activity/activity',
50 51
       'pages/activity/myActivity',

Binārs
src/assets/mine/accessrecord.png Parādīt failu


Binārs
src/assets/person/communicate.png Parādīt failu


+ 56
- 0
src/pages/person/accessRecord.js Parādīt failu

@@ -0,0 +1,56 @@
1
+import Taro, { Component } from '@tarojs/taro';
2
+import './index.scss'
3
+
4
+export default class Person extends Component {
5
+  config = {
6
+    navigationBarTitleText: '访问记录'
7
+  }
8
+
9
+  state = {
10
+
11
+  }
12
+
13
+  componentDidShow() {
14
+    // Taro.showLoading()
15
+  }
16
+  renderPop() {
17
+    return (
18
+      <View className="pop-box">
19
+
20
+
21
+        <View className="content">
22
+
23
+        </View>
24
+
25
+
26
+
27
+      </View>
28
+    )
29
+  }
30
+
31
+  render() {
32
+
33
+    return (
34
+      <Block>
35
+        {this.renderPop()}
36
+        <View className='access-page'>
37
+          <View className='item'>
38
+            <View className="tag">我的客户</View>
39
+            <Image className="touxiang" src={require('@assets/default-avatar.png')}></Image>
40
+            <View className="info-top">
41
+              <View className="name">曹建芳</View>
42
+              <Image className="goutong-icon" src={require('@assets/person/zixun.png')}></Image>
43
+              <View className="goutong">在线沟通</View>
44
+            </View>
45
+            <View className="activity-name">
46
+              活动名称展示处活动名称展示处活动名么的事借款部分手机电脑热风
47
+        </View>
48
+            <View className="activity-time">
49
+              2019-12-06 12:23:54
50
+        </View>
51
+          </View>
52
+        </View>
53
+      </Block>
54
+    )
55
+  }
56
+}

+ 90
- 0
src/pages/person/index.scss Parādīt failu

@@ -328,4 +328,94 @@
328 328
     width: 40px;
329 329
     height: 40px;
330 330
   }
331
+}
332
+.access-page{
333
+  padding: 30px;
334
+  .item{
335
+    height: 268px;
336
+    background: rgba(255,255,255,1);
337
+    box-shadow: 0px 4px 20px 0px rgba(0,0,0,0.09);
338
+    border-radius: 12px;
339
+    padding: 30px;
340
+    position: relative;
341
+    .tag{
342
+      position: absolute;
343
+      right: 0;
344
+      top: 0;
345
+      background-color: $primary-color;
346
+      padding: 10px 18px 10px 24px;
347
+      border-radius:0px 12px 0px 36px;
348
+      font-size: 26px;
349
+      color: #fff;
350
+    }
351
+    .touxiang{
352
+      width:88px;
353
+      height:88px;
354
+      border-radius: 44px;
355
+    }
356
+    .info-top{
357
+      display: flex;
358
+      position: absolute;
359
+      top: 46px;
360
+      left:140px;
361
+      align-items: center;
362
+      .name{
363
+        font-size: 40px;
364
+        color: #000;
365
+        font-weight: 500;
366
+        max-width: 300px;
367
+        @include text-ellipsis;
368
+      }
369
+      .goutong-icon{
370
+        width:40px;
371
+        height:40px;
372
+        background:rgba(255,219,179,0.2);
373
+        border-radius: 20px;
374
+        margin: 0 20px 0 30px;
375
+      }
376
+      .goutong{
377
+        font-size: 30px;
378
+        color: $primary-color;
379
+      }
380
+    }
381
+    .activity-name{
382
+      font-size: 32px;
383
+      color: #353535;
384
+      width: 620px;
385
+      @include text-ellipsis;
386
+      line-height: 72px;
387
+    }
388
+    .activity-time{
389
+      font-size: 26px;
390
+      color:rgba(0,0,0,0.33);
391
+      line-height: 40px;
392
+      text-align: right;
393
+    }
394
+  }
395
+}
396
+.pop-box{
397
+    position: fixed;
398
+    width: 100vw;
399
+    height: 100vh;
400
+    left: 0;
401
+    top: 0;
402
+    z-index: 9999;
403
+    background: rgba(0, 0, 0, 0.22);
404
+    display: flex;
405
+    flex-direction: column;
406
+    justify-content: center;
407
+    align-items: center;
408
+    .content {
409
+      width: 92vw;
410
+      height: 600px;
411
+      position: absolute;
412
+      left: 50%;
413
+      top: 44%;
414
+      margin-left: -46vw;
415
+      transform: translateY(-50%);
416
+      background-color: #fff;
417
+      border-radius: 12px;
418
+      padding: 30px;
419
+      text-align: center;
420
+    }
331 421
 }

+ 9
- 0
src/pages/person/menus.js Parādīt failu

@@ -17,6 +17,7 @@ const icons = {
17 17
   consultant: require('@assets/mine/consultant.png'),
18 18
   customerAnalysis: require('@assets/mine/customerAnalysis.png'),
19 19
   fenxi: require('@assets/mine/fenxi.png'),
20
+  accessrecord: require('@assets/mine/accessrecord.png'),
20 21
 }
21 22
 
22 23
 const DRIFT = ROLE_CODE['DRIFT']
@@ -58,6 +59,14 @@ const menus = [
58 59
       userTypes: [CONSULTANT],
59 60
       style: '',
60 61
     },
62
+    {
63
+      name: '访问记录',
64
+      url: '/pages/person/accessRecord',
65
+      icon: icons.accessrecord,
66
+      extends: undefined,
67
+      userTypes: [CONSULTANT],
68
+      style: '',
69
+    },
61 70
     // {
62 71
     //   name: '成为经纪人',
63 72
     //   url: '/pages/agent/become/index',

src/pages/project/middlePage.js → src/pages/project/h5Page.js Parādīt failu

@@ -5,6 +5,7 @@ import getUserPhone from '@utils/getUserPhone'
5 5
 import './index.scss'
6 6
 import { getHFiveDetail } from '@services/user'
7 7
 import ready from '@utils/ready'
8
+import { reportClient } from '@services/report'
8 9
 const bgImg = require('@assets/helpgroup/bg.png')
9 10
 
10 11
 @connect(state => state.user, { ...actions })
@@ -19,7 +20,6 @@ export default class Index extends Component {
19 20
   }
20 21
   componentWillMount() {
21 22
 
22
-
23 23
     ready.queue(() => {
24 24
       getHFiveDetail(this.$router.params.id).then(res => {
25 25
         this.setState({
@@ -84,6 +84,15 @@ export default class Index extends Component {
84 84
       }
85 85
     })
86 86
   }
87
+  // onShareAppMessage = () => {
88
+  //   const {pageInfo } = this.state
89
+  //   // const { agent: { nickname, personId, agentCode } } = this.state
90
+  //   return {
91
+  //     // title: `${nickname}邀请你成为经纪人`,
92
+  //     path: `/pages/project/h5Page?id=${personId}&from=share&recommender=${personId}&agentCode=${agentCode}`,//分享地址
93
+  //     imageUrl: pageInfo.shareImg
94
+  //   }
95
+  // }
87 96
   getPhoneNumber(e) {
88 97
     getUserPhone(e, (phoneNumber) => {
89 98
       if (!phoneNumber) {
@@ -100,6 +109,41 @@ export default class Index extends Component {
100 109
       }
101 110
     })
102 111
   }
112
+  // 报备客户
113
+  reportClient() {
114
+    const {
115
+      cardInfo: { id, projects = [] },
116
+      userInfo: { person: { phone, tel } }
117
+    } = this.props
118
+    const buildingId = projects[0]
119
+    const realPhone = phoneNumber || phone || tel
120
+    const payload = {
121
+      realtyConsultant: id, //报备人 置业顾问
122
+      buildingId,
123
+      phone: realPhone
124
+    }
125
+    const { cardInfo, userInfo: { person } } = this.props
126
+    if (person.personId != cardInfo.id) {
127
+      reportClient(payload).then(res => {
128
+        this.hideModal()
129
+        console.log('恭喜您绑定成功')
130
+        // this.setState({ bound: true })
131
+        // if (res !== 'bound') {
132
+        //   Taro.showToast({
133
+        //     title: '恭喜您绑定成功'
134
+        //   })
135
+        // }
136
+      }).catch(err => {
137
+        console.error(err)
138
+        this.setState({ bound: true })
139
+
140
+        // Taro.showToast({
141
+        //   title: err.message || err,
142
+        //   icon: 'none'
143
+        // })
144
+      })
145
+    }
146
+  }
103 147
 
104 148
   renderMaskBanner() {
105 149
     const { avatarVisible, phoneVisible, pageInfo } = this.state
@@ -128,7 +172,7 @@ export default class Index extends Component {
128 172
     return (
129 173
       <Block>
130 174
         {this.renderMaskBanner()}
131
-        {webViewVisible && <WebView src={pageInfo.h5Address} />}
175
+        {webViewVisible && <WebView src={pageInfo.h5Address + '?personid=xxx&h5id=xxx&xxxx'} />}
132 176
       </Block>
133 177
     )
134 178
   }

+ 20
- 11
src/pages/project/index.js Parādīt failu

@@ -4,7 +4,7 @@ import './index.scss'
4 4
 import ProjectItem from './item'
5 5
 import Banner from './banner'
6 6
 import HelpGroupBanner from './swiper'
7
-import ActivityItem from '../activity/item'
7
+// import ActivityItem from '../activity/item'
8 8
 
9 9
 import ready from '@utils/ready'
10 10
 import { getLocationCity } from '@services/map'
@@ -13,14 +13,15 @@ import { queryBanners, savePoint, updatePoint } from '@services/common'
13 13
 import { queryNewsList, queryHelpGroup } from '@services/news'
14 14
 import { queryActivityList } from '@services/activity'
15 15
 import { dispatchCitySelected } from '@actions/city'
16
-import { ROLE_CODE } from '@constants/user'
17
-import { connect } from '@tarojs/redux'
16
+import { ROLE_CODE, DECREASE_UNREADNUM } from '@constants/user'
17
+import { getStore, connect } from '@tarojs/redux'
18 18
 import * as actions from '@actions/project'
19 19
 import { transferImage } from '@utils/tools'
20 20
 import QQMapWX from '@lib/qqmap-wx-jssdk.min'
21 21
 import Notice from '@components/Notice'
22 22
 import Authorize from '@components/authorize'
23 23
 
24
+
24 25
 const accountInfo = wx.getAccountInfoSync();
25 26
 
26 27
 @connect(
@@ -31,7 +32,6 @@ export default class Index extends Component {
31 32
   config = {
32 33
     navigationBarTitleText: '橙蕉'
33 34
   }
34
-
35 35
   state = {
36 36
     maskVisible: false,
37 37
     keywords: '',
@@ -72,7 +72,13 @@ export default class Index extends Component {
72 72
       })
73 73
     })
74 74
   }
75
-
75
+  toChatList() {
76
+    // const { dispatch } = getStore()
77
+    // dispatch({ type: DECREASE_UNREADNUM })
78
+    Taro.navigateTo({
79
+      url: '/pages/im/list/index'
80
+    })
81
+  }
76 82
   componentDidShow() {
77 83
     if (this.props.curCity.id) {
78 84
       ready.queue(() => {
@@ -337,7 +343,7 @@ export default class Index extends Component {
337 343
       // h5
338 344
       case 'h5':
339 345
         Taro.navigateTo({
340
-          url: '/pages/project/middlePage?id=' + targetId
346
+          url: '/pages/project/h5Page?id=' + targetId
341 347
         })
342 348
         return;
343 349
 
@@ -345,7 +351,7 @@ export default class Index extends Component {
345 351
       case 'others':
346 352
       default:
347 353
         this.handleMaskClose()
348
-      return;
354
+        return;
349 355
     }
350 356
   }
351 357
 
@@ -387,10 +393,10 @@ export default class Index extends Component {
387 393
   }
388 394
 
389 395
   handleMaskBannerClick(data) {
390
-    console.log(data,"data")
396
+    console.log(data, "data")
391 397
     this.redirectTo(data)
392 398
 
393
-    
399
+
394 400
   }
395 401
 
396 402
   handleLocationClick() {
@@ -541,8 +547,7 @@ export default class Index extends Component {
541 547
     const { curCity } = this.props
542 548
     const { newsList, achieve } = this.state
543 549
     const { userInfo: { person: { personType, phone } } } = this.props
544
-    const { userInfo: { person } } = this.props
545
-
550
+    const { unReadNum, userInfo: { person } } = this.props
546 551
     return (
547 552
       <Block>
548 553
         {this.state.loaded && (
@@ -639,6 +644,10 @@ export default class Index extends Component {
639 644
             {/* user={person} onSuccess={()=>this.handleAuthPhoneSuccess(curCity) */}
640 645
             {/* {achieve && <View style="width:100%;height:100%"><Authorize ></Authorize>  </View>} */}
641 646
             {this.state.maskVisible && this.renderMaskBanner()}
647
+            <View className="chat-box" onClick={this.toChatList}>
648
+              {unReadNum > 0 && <View className="red-dot"></View >}
649
+              <Image className='chat-img' src={require('@assets/person/communicate.png')}></Image>
650
+            </View >
642 651
           </View >
643 652
         )}
644 653
       </Block>

+ 21
- 0
src/pages/project/index.scss Parādīt failu

@@ -550,4 +550,25 @@ height:172px;
550 550
       margin-top: 46px;
551 551
     }
552 552
   }
553
+}
554
+.chat-box{
555
+  position: fixed;
556
+  right: 30px;
557
+  bottom:6vh;
558
+  width: 88px;
559
+  height: 88px;
560
+  .red-dot{
561
+    width: 16px;
562
+    height: 16px;
563
+    background-color: red;
564
+    border-radius: 20px;
565
+    position: absolute;
566
+    right: 16px;
567
+    top: 14px;
568
+
569
+  }
570
+  .chat-img{
571
+    width: 88px;
572
+    height: 88px;
573
+  }
553 574
 }