xujing 5 lat temu
rodzic
commit
abe8954e4d

+ 2
- 1
src/app.js Wyświetl plik

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

BIN
src/assets/mine/accessrecord.png Wyświetl plik


BIN
src/assets/person/communicate.png Wyświetl plik


+ 56
- 0
src/pages/person/accessRecord.js Wyświetl plik

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 Wyświetl plik

328
     width: 40px;
328
     width: 40px;
329
     height: 40px;
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 Wyświetl plik

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
   fenxi: require('@assets/mine/fenxi.png'),
20
+  accessrecord: require('@assets/mine/accessrecord.png'),
20
 }
21
 }
21
 
22
 
22
 const DRIFT = ROLE_CODE['DRIFT']
23
 const DRIFT = ROLE_CODE['DRIFT']
58
       userTypes: [CONSULTANT],
59
       userTypes: [CONSULTANT],
59
       style: '',
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
     //   name: '成为经纪人',
71
     //   name: '成为经纪人',
63
     //   url: '/pages/agent/become/index',
72
     //   url: '/pages/agent/become/index',

src/pages/project/middlePage.js → src/pages/project/h5Page.js Wyświetl plik

5
 import './index.scss'
5
 import './index.scss'
6
 import { getHFiveDetail } from '@services/user'
6
 import { getHFiveDetail } from '@services/user'
7
 import ready from '@utils/ready'
7
 import ready from '@utils/ready'
8
+import { reportClient } from '@services/report'
8
 const bgImg = require('@assets/helpgroup/bg.png')
9
 const bgImg = require('@assets/helpgroup/bg.png')
9
 
10
 
10
 @connect(state => state.user, { ...actions })
11
 @connect(state => state.user, { ...actions })
19
   }
20
   }
20
   componentWillMount() {
21
   componentWillMount() {
21
 
22
 
22
-
23
     ready.queue(() => {
23
     ready.queue(() => {
24
       getHFiveDetail(this.$router.params.id).then(res => {
24
       getHFiveDetail(this.$router.params.id).then(res => {
25
         this.setState({
25
         this.setState({
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
   getPhoneNumber(e) {
96
   getPhoneNumber(e) {
88
     getUserPhone(e, (phoneNumber) => {
97
     getUserPhone(e, (phoneNumber) => {
89
       if (!phoneNumber) {
98
       if (!phoneNumber) {
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
   renderMaskBanner() {
148
   renderMaskBanner() {
105
     const { avatarVisible, phoneVisible, pageInfo } = this.state
149
     const { avatarVisible, phoneVisible, pageInfo } = this.state
128
     return (
172
     return (
129
       <Block>
173
       <Block>
130
         {this.renderMaskBanner()}
174
         {this.renderMaskBanner()}
131
-        {webViewVisible && <WebView src={pageInfo.h5Address} />}
175
+        {webViewVisible && <WebView src={pageInfo.h5Address + '?personid=xxx&h5id=xxx&xxxx'} />}
132
       </Block>
176
       </Block>
133
     )
177
     )
134
   }
178
   }

+ 20
- 11
src/pages/project/index.js Wyświetl plik

4
 import ProjectItem from './item'
4
 import ProjectItem from './item'
5
 import Banner from './banner'
5
 import Banner from './banner'
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
 import ready from '@utils/ready'
9
 import ready from '@utils/ready'
10
 import { getLocationCity } from '@services/map'
10
 import { getLocationCity } from '@services/map'
13
 import { queryNewsList, queryHelpGroup } from '@services/news'
13
 import { queryNewsList, queryHelpGroup } from '@services/news'
14
 import { queryActivityList } from '@services/activity'
14
 import { queryActivityList } from '@services/activity'
15
 import { dispatchCitySelected } from '@actions/city'
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
 import * as actions from '@actions/project'
18
 import * as actions from '@actions/project'
19
 import { transferImage } from '@utils/tools'
19
 import { transferImage } from '@utils/tools'
20
 import QQMapWX from '@lib/qqmap-wx-jssdk.min'
20
 import QQMapWX from '@lib/qqmap-wx-jssdk.min'
21
 import Notice from '@components/Notice'
21
 import Notice from '@components/Notice'
22
 import Authorize from '@components/authorize'
22
 import Authorize from '@components/authorize'
23
 
23
 
24
+
24
 const accountInfo = wx.getAccountInfoSync();
25
 const accountInfo = wx.getAccountInfoSync();
25
 
26
 
26
 @connect(
27
 @connect(
31
   config = {
32
   config = {
32
     navigationBarTitleText: '橙蕉'
33
     navigationBarTitleText: '橙蕉'
33
   }
34
   }
34
-
35
   state = {
35
   state = {
36
     maskVisible: false,
36
     maskVisible: false,
37
     keywords: '',
37
     keywords: '',
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
   componentDidShow() {
82
   componentDidShow() {
77
     if (this.props.curCity.id) {
83
     if (this.props.curCity.id) {
78
       ready.queue(() => {
84
       ready.queue(() => {
337
       // h5
343
       // h5
338
       case 'h5':
344
       case 'h5':
339
         Taro.navigateTo({
345
         Taro.navigateTo({
340
-          url: '/pages/project/middlePage?id=' + targetId
346
+          url: '/pages/project/h5Page?id=' + targetId
341
         })
347
         })
342
         return;
348
         return;
343
 
349
 
345
       case 'others':
351
       case 'others':
346
       default:
352
       default:
347
         this.handleMaskClose()
353
         this.handleMaskClose()
348
-      return;
354
+        return;
349
     }
355
     }
350
   }
356
   }
351
 
357
 
387
   }
393
   }
388
 
394
 
389
   handleMaskBannerClick(data) {
395
   handleMaskBannerClick(data) {
390
-    console.log(data,"data")
396
+    console.log(data, "data")
391
     this.redirectTo(data)
397
     this.redirectTo(data)
392
 
398
 
393
-    
399
+
394
   }
400
   }
395
 
401
 
396
   handleLocationClick() {
402
   handleLocationClick() {
541
     const { curCity } = this.props
547
     const { curCity } = this.props
542
     const { newsList, achieve } = this.state
548
     const { newsList, achieve } = this.state
543
     const { userInfo: { person: { personType, phone } } } = this.props
549
     const { userInfo: { person: { personType, phone } } } = this.props
544
-    const { userInfo: { person } } = this.props
545
-
550
+    const { unReadNum, userInfo: { person } } = this.props
546
     return (
551
     return (
547
       <Block>
552
       <Block>
548
         {this.state.loaded && (
553
         {this.state.loaded && (
639
             {/* user={person} onSuccess={()=>this.handleAuthPhoneSuccess(curCity) */}
644
             {/* user={person} onSuccess={()=>this.handleAuthPhoneSuccess(curCity) */}
640
             {/* {achieve && <View style="width:100%;height:100%"><Authorize ></Authorize>  </View>} */}
645
             {/* {achieve && <View style="width:100%;height:100%"><Authorize ></Authorize>  </View>} */}
641
             {this.state.maskVisible && this.renderMaskBanner()}
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
           </View >
651
           </View >
643
         )}
652
         )}
644
       </Block>
653
       </Block>

+ 21
- 0
src/pages/project/index.scss Wyświetl plik

550
       margin-top: 46px;
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
 }