xujing 5 年之前
父節點
當前提交
7e2e614d2d

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

@@ -45,7 +45,8 @@ class App extends Component {
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
+      'pages/person/myShare/accessRecord',
49
+      'pages/person/myShare/index',
49 50
       'pages/shop/index',
50 51
       'pages/activity/activity',
51 52
       'pages/activity/myActivity',

二進制
src/assets/person/cancel.png 查看文件


二進制
src/assets/person/left.png 查看文件


二進制
src/assets/person/message.png 查看文件


+ 53
- 0
src/components/consultant/index.js 查看文件

@@ -0,0 +1,53 @@
1
+import Taro, { Component } from '@tarojs/taro';
2
+import './index.scss'
3
+
4
+export default class Index extends Component {
5
+    state = {
6
+        show: true,
7
+    }
8
+    static options = {
9
+        addGlobalClass: true,
10
+    };
11
+    static defaultProps = {
12
+        style: {}
13
+    }
14
+    handleClick() {
15
+        this.setState({
16
+            show: false
17
+        })
18
+    }
19
+    handleClickTwo() {
20
+        this.setState({
21
+            show: true
22
+        })
23
+    }
24
+    render() {
25
+        const { show } = this.state
26
+        return (
27
+            <View>
28
+                {show &&
29
+                    <View className="consultant" style={this.props.style} onClick={this.handleClick}  >
30
+                        <Image src={require('@assets/person/left.png')}  className='left-img'></Image>
31
+                        <Image src="http://pic3.zhimg.com/50/v2-55f854baa56381deff541029d51662d0_hd.jpg" className='img'></Image>
32
+                        <View className="text">哈哈哈</View>
33
+                    </View>
34
+                }
35
+                {!show &&
36
+                    <View className="consultant-more" style={this.props.style} >
37
+                         <Image src={require('@assets/person/cancel.png')}  onClick={this.handleClickTwo}className='cancel-img'></Image>
38
+                        <Image src="http://pic3.zhimg.com/50/v2-55f854baa56381deff541029d51662d0_hd.jpg" className='touxiang'></Image>
39
+                        <View className="text">
40
+                            <View className="name">哈哈哈</View>
41
+                            <View className="company">南京橙蕉互动数字科技有限公司</View>
42
+                        </View>
43
+                        <Image src={require('@assets/person/phone.png')} className='phone-img'></Image>
44
+                        <Image src={require('@assets/person/message.png')} className='message-img'></Image>
45
+                    </View>
46
+                }
47
+
48
+                <View>
49
+                </View>
50
+            </View>
51
+        );
52
+    }
53
+}

+ 80
- 0
src/components/consultant/index.scss 查看文件

@@ -0,0 +1,80 @@
1
+@import "@styles/theme.scss";
2
+.consultant {
3
+  position: fixed;
4
+  bottom: 140px;
5
+  right: 0;
6
+  height: 84px;
7
+  background-color: #fff;
8
+  box-shadow:0px 4px 12px 0px rgba(0,0,0,0.25);
9
+  border-radius:78px 0px 0px 78px;
10
+  z-index: 99;
11
+  display: flex;
12
+  align-items: center;
13
+  padding: 0 10px;
14
+  transition: all 1s;
15
+  .left-img{
16
+      width: 18px;
17
+      height: 34px;
18
+      margin-right: 12px;
19
+  }
20
+  .img{
21
+    width: 48px;
22
+    height: 48px;
23
+    border-radius: 24px;
24
+    margin: 3px 0;
25
+  }
26
+  .text {
27
+    color: $primary-color;
28
+    font-size: 32px;
29
+    margin: 0 10px;
30
+  }
31
+
32
+}
33
+.consultant-more{
34
+    width:706px;
35
+    height:142px;
36
+    background:rgba(0,0,0,0.5);
37
+    border-radius:146px 0px 0px 146px;
38
+    position: fixed;
39
+    bottom: 12%;
40
+    right: 0;
41
+    display: flex;
42
+    align-items: center;
43
+    padding: 0 16px;
44
+    .cancel-img{
45
+        width: 36px;
46
+        height: 36px;
47
+        margin-right: 16px;
48
+      }
49
+    .touxiang{
50
+        width: 86px;
51
+        height: 86px;
52
+        border-radius: 45px;
53
+        border:1px solid #fff;
54
+    }
55
+    .text{
56
+        margin:  0 10px;
57
+        .name{
58
+            font-size: 32px;
59
+            color: #fff;
60
+            width: 300px;
61
+            @include text-ellipsis;
62
+        }
63
+        .company{
64
+            font-size: 26px;
65
+            color: #fff;
66
+            margin-top: 12px;
67
+            width: 380px;
68
+            @include text-ellipsis;
69
+        }
70
+    }
71
+    .phone-img{
72
+        width:42px;
73
+        height:42px;
74
+    }
75
+    .message-img{
76
+        width:42px;
77
+        height:42px;
78
+        margin-left: 30px;
79
+    }
80
+}

+ 3
- 1
src/pages/news/detail/index.js 查看文件

@@ -5,6 +5,7 @@ import dayjs from 'dayjs'
5 5
 import Poster from './poster'
6 6
 import WxParse from '@components/wxParse/wxParse'
7 7
 import BackHomeBtn from '@components/BackHomeBtn'
8
+import Consultant from '@components/consultant'
8 9
 import Notice from '@components/Notice'
9 10
 import { getMiniQrcode, savePoint, updatePoint } from '@services/common'
10 11
 import { getDownloadURL, transferImage } from '@utils/tools'
@@ -245,7 +246,8 @@ export default class NewsDetail extends Component {
245 246
               </ScrollView>
246 247
               
247 248
               <Notice></Notice>
248
-              <BackHomeBtn></BackHomeBtn>
249
+              <BackHomeBtn ></BackHomeBtn>
250
+              {/* <Consultant></Consultant> */}
249 251
 
250 252
               <View className="bot-nav flex">
251 253
                 <View className='btn poster-btn' style={{ display: posterShow }} onClick={() => { this.handleTogglePoster(true) }}>

+ 13
- 4
src/pages/person/customerAnalysis/followUpCustomer/index.js 查看文件

@@ -10,7 +10,8 @@ import { transferImage } from '@utils/tools'
10 10
 
11 11
 const maleImg = require('@assets/person/male.png')
12 12
 const femaleImg = require('@assets/person/female.png')
13
-const phoneImg = require('@assets/person/phone.png')
13
+const phoneImg = require('@assets/person/dianhua.png')
14
+const communicateImg = require('@assets/person/communicate.png')
14 15
 
15 16
 @connect(({ user, city }) => ({ user, city }))
16 17
 export default class transactionCustomer extends Taro.Component {
@@ -247,7 +248,13 @@ export default class transactionCustomer extends Taro.Component {
247 248
       </View>
248 249
     )
249 250
   }
250
-
251
+  handleChatClick(item, e) {
252
+    e.stopPropagation()
253
+    const { userInfo: { person: { personId, nickname, name } } } = this.props
254
+    Taro.navigateTo({
255
+      url: `/pages/im/index?sendId=${personId}&sendName=${encodeURIComponent(name || nickname)}&receiverId=${item.personId}&receiverName=${encodeURIComponent(item.name || item.nickname)}`
256
+    })
257
+  }
251 258
   render() {
252 259
     const { customerList, screenVisible, isEmpty, hasMore } = this.state
253 260
 
@@ -278,7 +285,7 @@ export default class transactionCustomer extends Taro.Component {
278 285
                   <View class="item" key={index + 'customerList'} onClick={this.toMyCustomer.bind(this, item.customerId)}>
279 286
                     <Image src={transferImage(item.picture) || require('@assets/default-avatar.png')} className='img'></Image>
280 287
                     <View className="name">
281
-                      {item.name}
288
+                      <Text class="name-text">{item.name}</Text>
282 289
                       {
283 290
                         item.sex == '1' && <Image style="width:36rpx;height:38rpx;margin-left:10rpx" src={maleImg} />
284 291
                       }
@@ -286,7 +293,9 @@ export default class transactionCustomer extends Taro.Component {
286 293
                         item.sex == '2' && <Image src={femaleImg} style="width:36rpx;height:36rpx;margin-left:10rpx" />
287 294
                       }
288 295
                     </View>
289
-                    <View className="phone" onClick={this.handleTelClick.bind(this, item)}>{item.phone}<Image style="width:36rpx;height:36rpx;margin-left:20rpx;" src={phoneImg} /></View>
296
+                    <View className="phone" >{item.phone}</View>
297
+                    <Image className="phone-icon" onClick={this.handleTelClick.bind(this, item)} src={phoneImg} />
298
+                    <Image className="goutong-icon" onClick={this.handleChatClick.bind(this, item)} src={communicateImg}></Image>
290 299
                     <View className="status">{item.status == 1 ? '报备' : item.status == 2 ? '到访' : item.status == 3 ? '认筹' : '签约'}</View>
291 300
                   </View>
292 301
                 ))

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

@@ -156,6 +156,12 @@
156 156
     top:24px;
157 157
     left:120px;
158 158
   }
159
+  .name-text{
160
+    display: inline-block;
161
+    max-width: 200px;
162
+    @include text-ellipsis;
163
+
164
+  }
159 165
   .phone{
160 166
     color: #333;
161 167
     font-size: 30px;
@@ -165,8 +171,25 @@
165 171
     display: flex;
166 172
     align-items: center;
167 173
   }
174
+  .goutong-icon{
175
+    position: absolute;
176
+    width:76px;
177
+    height:76px;
178
+    top: 36px;
179
+    right:222px;
180
+  }
181
+  .phone-icon{
182
+    position: absolute;
183
+    width:76px;
184
+    height:76px;
185
+    top: 36px;
186
+    right:100px;
187
+  }
168 188
   .status{
169 189
     color:$primary-color;
170 190
     font-size: 32px;
191
+    position: absolute;
192
+    top: 20px;
193
+    right: 20px;
171 194
   }
172 195
 }

+ 14
- 13
src/pages/person/customerAnalysis/transactionCustomer/index.js 查看文件

@@ -7,7 +7,8 @@ import { transferImage } from '@utils/tools'
7 7
 
8 8
 const maleImg = require('@assets/person/male.png')
9 9
 const femaleImg = require('@assets/person/female.png')
10
-const phoneImg = require('@assets/person/phone.png')
10
+const phoneImg = require('@assets/person/dianhua.png')
11
+const communicateImg = require('@assets/person/communicate.png')
11 12
 
12 13
 
13 14
 @connect(({ user, city }) => ({ user, city }))
@@ -86,7 +87,13 @@ export default class transactionCustomer extends Taro.Component {
86 87
       followVisible: false,
87 88
     })
88 89
   }
89
-
90
+  handleChatClick(item, e) {
91
+    e.stopPropagation()
92
+    const { userInfo: { person: { personId, nickname, name } } } = this.props
93
+    Taro.navigateTo({
94
+      url: `/pages/im/index?sendId=${personId}&sendName=${encodeURIComponent(name || nickname)}&receiverId=${item.personId}&receiverName=${encodeURIComponent(item.name || item.nickname)}`
95
+    })
96
+  }
90 97
   render() {
91 98
     const { customerList, isEmpty, hasMore } = this.state
92 99
 
@@ -102,35 +109,29 @@ export default class transactionCustomer extends Taro.Component {
102 109
           onScrollToLower={fn => this.onScrollToLower(fn)}
103 110
         >
104 111
           <View className="list">
105
-            {
106
-              !customerList.length &&
107
-              <View></View>
108
-              // <View style="margin:50px auto;text-align:center;font-size:14px;color:#888">暂无成交客户~</View>
109
-            }
110 112
             {
111 113
               customerList.length &&
112 114
               customerList.map((item, index) => (
113 115
                 <View class="item" key={index + 'transaction'} onClick={this.toMyCustomer.bind(this, item.customerId)}>
114 116
                   <Image src={transferImage(item.picture) || require('@assets/default-avatar.png')} className='img'></Image>
115 117
                   <View className="name">
116
-                    {item.name}
118
+                    <Text class="name-text">{item.name}</Text>
117 119
                     {
118
-                      item.sex == '1' && <Image style="width:36rpx;height:38rpx;margin-left:10rpx" src={maleImg} />
120
+                      item.sex == '1' && <Image style="width:36rpx;height:38rpx;margin-left:20rpx" src={maleImg} />
119 121
                     }
120 122
                     {
121
-                      item.sex == '2' && <Image style="width:36rpx;height:36rpx;margin-left:10rpx" src={femaleImg} />
123
+                      item.sex == '2' && <Image style="width:36rpx;height:36rpx;margin-left:20rpx" src={femaleImg} />
122 124
                     }
123 125
                   </View>
124 126
                   <View className="phone">{item.phone} </View>
125
-                  <Image style="width:36rpx;height:36rpx;margin-right:20rpx" src={phoneImg} onClick={this.handleTelClick.bind(this, item)} />
127
+                  <Image className="phone-icon" src={phoneImg} onClick={this.handleTelClick.bind(this, item)} />
128
+                  <Image className="goutong-icon" onClick={this.handleChatClick.bind(this, item)} src={communicateImg} ></Image>
126 129
 
127 130
                 </View>
128 131
               ))
129 132
             }
130 133
           </View>
131 134
         </ListView>
132
-
133
-
134 135
       </View>
135 136
     )
136 137
   }

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

@@ -20,6 +20,12 @@
20 20
     top:24px;
21 21
     left:120px;
22 22
   }
23
+  .name-text{
24
+    display: inline-block;
25
+    max-width: 200px;
26
+    @include text-ellipsis;
27
+
28
+  }
23 29
   .phone{
24 30
     color: #333;
25 31
     font-size: 30px;
@@ -27,4 +33,19 @@
27 33
     bottom:24px;
28 34
     left:120px;
29 35
   }
36
+ 
37
+  .goutong-icon{
38
+    position: absolute;
39
+    width:76px;
40
+    height:76px;
41
+    top: 36px;
42
+    right:220px;
43
+  }
44
+  .phone-icon{
45
+    position: absolute;
46
+    width:76px;
47
+    height:76px;
48
+    top: 36px;
49
+    right:98px;
50
+  }
30 51
 }

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

@@ -329,138 +329,4 @@
329 329
     height: 40px;
330 330
   }
331 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
-    margin-bottom: 20px;
342
-    .tag{
343
-      position: absolute;
344
-      left: 26px;
345
-      top: 102px;
346
-      width:96px;
347
-      height:32px;
348
-      line-height: 32px;
349
-      text-align: center;
350
-      background:rgba(237,202,115,1);
351
-      border-radius:2px;
352
-      font-size: 22px;
353
-      color: #fff;
354
-    }
355
-    .touxiang{
356
-      width:88px;
357
-      height:88px;
358
-      border-radius: 44px;
359
-    }
360
-    .info-top{
361
-      display: flex;
362
-      position: absolute;
363
-      top: 46px;
364
-      left:140px;
365
-      align-items: center;
366
-      justify-content: space-between;
367
-      width: 520px;
368
-      .name{
369
-        font-size: 40px;
370
-        color: #000;
371
-        font-weight: 500;
372
-        max-width: 300px;
373
-        @include text-ellipsis;
374
-      }
375
-      .goutong-icon{
376
-        width:44px;
377
-        height:44px;
378
-        background:rgba(255,219,179,0.2);
379
-        border-radius: 22px;
380
-        margin: 0 10px;
381
-      }
382
-      .goutong{
383
-        font-size: 38px;
384
-        color: $primary-color;
385
-        border-bottom: 4px solid #EDCA73;
386
-        line-height: 28px;
387
-      }
388 332
 
389
-    }
390
-    .right-icon{
391
-      position: absolute;
392
-      right: 30px;
393
-      top: 150px;
394
-      width:20px;
395
-      height:20px;
396
-      border-top: 3px solid #888888;
397
-      border-right: 3px solid #888888;
398
-      transform:rotate(45deg);
399
-    }
400
-    .activity-name{
401
-      font-size: 32px;
402
-      color: #353535;
403
-      width: 620px;
404
-      @include text-ellipsis;
405
-      line-height: 72px;
406
-    }
407
-    .activity-time{
408
-      font-size: 26px;
409
-      color:rgba(0,0,0,0.33);
410
-      line-height: 40px;
411
-      text-align: right;
412
-    }
413
-  }
414
-}
415
-.pop-box{
416
-    position: fixed;
417
-    width: 100vw;
418
-    height: 100vh;
419
-    left: 0;
420
-    top: 0;
421
-    z-index: 9999;
422
-    background: rgba(0, 0, 0, 0.22);
423
-    display: flex;
424
-    flex-direction: column;
425
-    justify-content: center;
426
-    align-items: center;
427
-    .content {
428
-      width: 92vw;
429
-      height: 600px;
430
-      position: absolute;
431
-      left: 4vw;
432
-      top: 12vh;
433
-      background-color: #fff;
434
-      border-radius: 12px;
435
-      padding: 20px 20px;
436
-
437
-      .scroll-con{
438
-        height: 500px;
439
-        width: 100%;
440
-        overflow-y: scroll;
441
-        .activity-item{
442
-          padding: 16px 30px;
443
-          border-bottom: 2px solid rgba(0,0,0,0.08);
444
-          .name{
445
-            font-size: 32px;
446
-            color: #353535;
447
-            width: 600px;
448
-            @include text-ellipsis;
449
-          }
450
-          .time{
451
-            font-size: 26px;
452
-            color:rgba(0,0,0,0.33);
453
-            text-align: right;
454
-            margin-top: 20px;
455
-          }
456
-        }
457
-
458
-      }
459
-
460
-    }
461
-    .close{
462
-      font-size: 48px;
463
-      color: rgba(0,0,0,0.3);
464
-      float: right;
465
-    }
466
-}

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

@@ -17,7 +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
+  share: require('@assets/mine/accessrecord.png'),
21 21
 }
22 22
 
23 23
 const DRIFT = ROLE_CODE['DRIFT']
@@ -60,9 +60,9 @@ const menus = [
60 60
       style: '',
61 61
     },
62 62
     {
63
-      name: '访客信息',
64
-      url: '/pages/person/accessRecord',
65
-      icon: icons.accessrecord,
63
+      name: '我的分享',
64
+      url: '/pages/person/myShare/index',
65
+      icon: icons.share,
66 66
       extends: undefined,
67 67
       userTypes: [CONSULTANT],
68 68
       style: '',

src/pages/person/accessRecord.js → src/pages/person/myShare/accessRecord.js 查看文件

@@ -2,7 +2,7 @@ import Taro, { Component } from '@tarojs/taro';
2 2
 import ListView from '@components/ListView'
3 3
 import { connect } from '@tarojs/redux'
4 4
 import './index.scss'
5
-import { getConsulantVisitRecord, getMoreVisitRecord } from '@services/person'
5
+import { getConsulantVisitRecord } from '@services/person'
6 6
 import { savePoint, updatePoint } from '@services/common'
7 7
 import dayjs from 'dayjs';
8 8
 
@@ -14,13 +14,11 @@ export default class Person extends Component {
14 14
   }
15 15
 
16 16
   state = {
17
-    popVisible: false,
18 17
     recordId: undefined, // 埋点ID
19 18
     recordList: [],
20 19
     hasMore: true,
21 20
     isEmpty: false,
22 21
     pageIndex: 1,
23
-    moreRecord: []
24 22
   }
25 23
 
26 24
   componentWillMount() {
@@ -41,12 +39,6 @@ export default class Person extends Component {
41 39
     const { recordId } = this.state
42 40
     recordId && updatePoint(recordId)
43 41
   }
44
-
45
-  handleMaskClose() {
46
-    this.setState({
47
-      popVisible: false,
48
-    })
49
-  }
50 42
   componentDidShow() {
51 43
     Taro.showLoading()
52 44
     this.loadList(1)
@@ -96,30 +88,6 @@ export default class Person extends Component {
96 88
     rest && rest()
97 89
     this.refreshing = false
98 90
   }
99
-
100
-
101
-  showActivityList(item) {
102
-    Taro.showLoading()
103
-    this.setState({
104
-      popVisible: true,
105
-    })
106
-
107
-    const { userInfo: { person } } = this.props
108
-    const payload = {
109
-      userId: person.userId,
110
-      personId: item.personId,
111
-    }
112
-    getMoreVisitRecord(payload).then(res => {
113
-      Taro.hideLoading()
114
-      this.setState({
115
-        moreRecord: res.records || []
116
-      })
117
-
118
-    }).catch(err => {
119
-      console.log(err, "获取更多访客信息err")
120
-      Taro.hideLoading()
121
-    })
122
-  }
123 91
   handleChatClick(item, e) {
124 92
     e.stopPropagation()
125 93
     const { userInfo: { person: { personId, nickname, name } } } = this.props
@@ -127,32 +95,12 @@ export default class Person extends Component {
127 95
       url: `/pages/im/index?sendId=${personId}&sendName=${encodeURIComponent(name || nickname)}&receiverId=${item.personId}&receiverName=${encodeURIComponent(item.name || item.nickname)}`
128 96
     })
129 97
   }
130
-  renderPop() {
131
-    const { moreRecord } = this.state
132
-    return (
133
-      <View className="pop-box">
134
-        <View className="content">
135
-          <Icon className="iconfont close icon-buoumaotubiao20" onClick={this.handleMaskClose}></Icon>
136
-          <View className="scroll-con">
137
-            {
138
-              moreRecord.map(item => (
139
-                <View className="activity-item">
140
-                  <View className="name">{item.activityName || ' '}</View>
141
-                  <View className="time">{`${dayjs(item.visitTime).format('YYYY-MM-DD HH:mm:ss')}`}</View>
142
-                </View>
143
-              ))
144
-            }
145
-          </View>
146
-        </View>
147
-      </View>
148
-    )
149
-  }
98
+
150 99
   render() {
151
-    const { popVisible, isEmpty, hasMore, recordList } = this.state
100
+    const { isEmpty, hasMore, recordList } = this.state
152 101
     return (
153
-      <Block>
154
-        {popVisible && this.renderPop()}
155 102
 
103
+      <Block>
156 104
         <ListView
157 105
           className="wrap"
158 106
           needInit
@@ -163,7 +111,6 @@ export default class Person extends Component {
163 111
           onScrollToLower={fn => this.onScrollToLower(fn)}
164 112
         >
165 113
           <View className='access-page'>
166
-
167 114
             {
168 115
               recordList.map(item => (
169 116
                 <View className='item' key={item + 'more'}>
@@ -173,10 +120,6 @@ export default class Person extends Component {
173 120
                     <View className="name">{item.userName || item.nickname || ' '}</View>
174 121
                     <View style="display: flex;align-items: center;" onClick={this.handleChatClick.bind(this, item)}><Image className="goutong-icon" src={require('@assets/person/zixun.png')}></Image><Text className="goutong">在线沟通</Text></View>
175 122
                   </View>
176
-                  <View className="activity-name" onClick={this.showActivityList.bind(this, item)}>
177
-                    {item.activityName || ' '}
178
-                  </View>
179
-                  <Text className="right-icon"></Text>
180 123
                   <View className="activity-time">
181 124
                     {`${dayjs(item.visitTime).format('YYYY-MM-DD HH:mm:ss')}`}
182 125
                   </View>

+ 124
- 0
src/pages/person/myShare/index.js 查看文件

@@ -0,0 +1,124 @@
1
+import Taro, { Component } from '@tarojs/taro';
2
+import ListView from '@components/ListView'
3
+import { connect } from '@tarojs/redux'
4
+import './index.scss'
5
+// import { getConsulantVisitRecord} from '@services/person'
6
+import { savePoint, updatePoint } from '@services/common'
7
+import dayjs from 'dayjs';
8
+
9
+@connect(state => state.user)
10
+
11
+export default class Person extends Component {
12
+  config = {
13
+    navigationBarTitleText: '我的分享'
14
+  }
15
+
16
+  state = {
17
+    recordId: undefined, // 埋点ID
18
+    recordList: [],
19
+    hasMore: true,
20
+    isEmpty: false,
21
+    pageIndex: 1,
22
+  }
23
+
24
+  componentWillMount() {
25
+
26
+    savePoint({
27
+      event: 'list',
28
+      eventType: 'activity',
29
+      propertyName: '我的分享',
30
+      data: '{}'
31
+    }).then(res => {
32
+      this.setState({
33
+        recordId: res.recordId
34
+      })
35
+      console.log('我的分享')
36
+    })
37
+  }
38
+  componentWillUnmount() {
39
+    const { recordId } = this.state
40
+    recordId && updatePoint(recordId)
41
+  }
42
+
43
+  componentDidShow() {
44
+    // Taro.showLoading()
45
+    // this.loadList(1)
46
+  }
47
+  // loadList(pageNumber) {
48
+  //   console.log(this.props, "this.props")
49
+  //   const { userInfo: { person } } = this.props
50
+
51
+  //   let payload
52
+  //   if(person.userId){
53
+  //     payload = {
54
+  //       userId: person.userId,
55
+  //       pageNumber,
56
+  //       pageSize: 5
57
+  //     }
58
+  //   }else{
59
+  //    payload = {
60
+  //      userId: Taro.getStorageSync('userId'),
61
+  //      pageNumber,
62
+  //      pageSize: 5
63
+  //    }
64
+  //   }
65
+  //   getConsulantVisitRecord(payload).then(res => {
66
+
67
+  //     const { records, list, total, current, pages } = res || {}
68
+  //     const _list = records || list || []
69
+  //     const newList = current <= 1 ? _list : this.state.recordList.concat(_list)
70
+  //     this.setState({
71
+  //       recordList: newList,
72
+  //       isEmpty: total == 0 || !res,
73
+  //       hasMore: current < pages,
74
+  //       pageIndex: current >= pages ? pages : current
75
+  //     })
76
+  //     Taro.hideLoading()
77
+  //   })
78
+  // }
79
+  // onScrollToLower = async (fn) => {
80
+  //   const { pageIndex } = this.state;
81
+  //   this.loadList(pageIndex + 1)
82
+  //   fn && fn();
83
+  // }
84
+  // onPullDownRefresh = (rest) => {
85
+  //   // debugger
86
+  //   if (this.refreshing) return
87
+  //   this.refreshing = true
88
+  //   this.loadList(1)
89
+  //   rest && rest()
90
+  //   this.refreshing = false
91
+  // }
92
+
93
+  handleItemClick() {
94
+    Taro.navigateTo({
95
+      url: `/pages/person/myShare/accessRecord`
96
+    })
97
+  }
98
+
99
+  render() {
100
+    const { isEmpty, hasMore, recordList } = this.state
101
+    return (
102
+      <ListView
103
+        className="wrap"
104
+        needInit
105
+        isEmpty={isEmpty}
106
+        emptyText="暂无我的分享~"
107
+        hasMore={hasMore}
108
+        onPullDownRefresh={fn => this.onPullDownRefresh(fn)}
109
+        onScrollToLower={fn => this.onScrollToLower(fn)}
110
+      >
111
+        <View className='share-page'>
112
+          <View className="share-item" onClick={this.handleItemClick}>
113
+            <Image className="img" src={require('@assets/default-avatar.png')}></Image>
114
+            <View className="name">鱼嘴润府</View>
115
+            <View className="price"> 均价35000元/m² </View>
116
+            <View className="num"> 5人查看了分享 </View>
117
+            <View className="address"> 南京市锦创广场水西门大街2号 </View>
118
+          </View>
119
+        </View>
120
+      </ListView>
121
+
122
+    )
123
+  }
124
+}

+ 159
- 0
src/pages/person/myShare/index.scss 查看文件

@@ -0,0 +1,159 @@
1
+@import "@styles/theme.scss";
2
+.share-page{
3
+  padding: 10px 30px;
4
+  .share-item{
5
+    padding: 20px 0;
6
+    border-bottom: 1px solid rgba(0,0,0,0.08);
7
+    position: relative;
8
+    .img{
9
+      width:220px;
10
+      height:176px;
11
+    }
12
+    .name{
13
+      position: absolute;
14
+      left: 240px;
15
+      top: 50px;
16
+      color: #333;
17
+      font-size: 34px;
18
+      max-width: 190px;
19
+      @include text-ellipsis;
20
+    }
21
+    .price{
22
+      position: absolute;
23
+      right: 0px;
24
+      top: 50px;
25
+      font-size: 34px;
26
+      color: #FF2359;
27
+      max-width: 260px;
28
+      @include text-ellipsis;
29
+    }
30
+    .num{
31
+      position: absolute;
32
+      left: 240px;
33
+      top: 114px;
34
+      font-size: 28px;
35
+      color: $primary-color;
36
+    }
37
+    .address{
38
+      font-size: 24px;
39
+      color: #888;
40
+      position: absolute;
41
+      right: 0px;
42
+      bottom: 20px;
43
+      max-width: 400px;
44
+      @include text-ellipsis;
45
+    }
46
+  }
47
+}
48
+.access-page{
49
+    padding: 0 30px;
50
+    .item{
51
+      padding: 30px 0 12px 0;
52
+      border-bottom: 1px solid rgba(0,0,0,0.08);
53
+      position: relative;
54
+      .tag{
55
+        position: absolute;
56
+        left: -2px;
57
+        top: 102px;
58
+        width:96px;
59
+        height:32px;
60
+        line-height: 32px;
61
+        text-align: center;
62
+        background:rgba(237,202,115,1);
63
+        border-radius:2px;
64
+        font-size: 22px;
65
+        color: #fff;
66
+      }
67
+      .touxiang{
68
+        width:88px;
69
+        height:88px;
70
+        border-radius: 44px;
71
+      }
72
+      .info-top{
73
+        display: flex;
74
+        position: absolute;
75
+        top: 46px;
76
+        left:112px;
77
+        align-items: center;
78
+        .name{
79
+          font-size: 40px;
80
+          color: #000;
81
+          font-weight: 500;
82
+          max-width: 300px;
83
+          @include text-ellipsis;
84
+          margin-right: 24px;
85
+        }
86
+        .goutong-icon{
87
+          width:44px;
88
+          height:44px;
89
+          background:rgba(255,219,179,0.2);
90
+          border-radius: 22px;
91
+          margin: 0 10px;
92
+        }
93
+        .goutong{
94
+          font-size: 38px;
95
+          color: $primary-color;
96
+          border-bottom: 4px solid #EDCA73;
97
+          line-height: 28px;
98
+        }
99
+  
100
+      }
101
+      .activity-time{
102
+        font-size: 26px;
103
+        color:rgba(0,0,0,0.33);
104
+        text-align: right;
105
+      }
106
+    }
107
+  }
108
+//   .pop-box{
109
+//       position: fixed;
110
+//       width: 100vw;
111
+//       height: 100vh;
112
+//       left: 0;
113
+//       top: 0;
114
+//       z-index: 9999;
115
+//       background: rgba(0, 0, 0, 0.22);
116
+//       display: flex;
117
+//       flex-direction: column;
118
+//       justify-content: center;
119
+//       align-items: center;
120
+//       .content {
121
+//         width: 92vw;
122
+//         height: 600px;
123
+//         position: absolute;
124
+//         left: 4vw;
125
+//         top: 12vh;
126
+//         background-color: #fff;
127
+//         border-radius: 12px;
128
+//         padding: 20px 20px;
129
+  
130
+//         .scroll-con{
131
+//           height: 500px;
132
+//           width: 100%;
133
+//           overflow-y: scroll;
134
+//           .activity-item{
135
+//             padding: 16px 30px;
136
+//             border-bottom: 2px solid rgba(0,0,0,0.08);
137
+//             .name{
138
+//               font-size: 32px;
139
+//               color: #353535;
140
+//               width: 600px;
141
+//               @include text-ellipsis;
142
+//             }
143
+//             .time{
144
+//               font-size: 26px;
145
+//               color:rgba(0,0,0,0.33);
146
+//               text-align: right;
147
+//               margin-top: 20px;
148
+//             }
149
+//           }
150
+  
151
+//         }
152
+  
153
+//       }
154
+//       .close{
155
+//         font-size: 48px;
156
+//         color: rgba(0,0,0,0.3);
157
+//         float: right;
158
+//       }
159
+//   }

+ 3
- 1
src/pages/project/h5Page.js 查看文件

@@ -291,9 +291,11 @@ export default class Index extends Component {
291 291
     const { pageInfo, webViewVisible, codeParams } = this.state
292 292
     const { userInfo: { person } } = this.props
293 293
     const consultant = person.personType == ROLE_CODE['CONSULTANT'] ? person.userId : ""
294
+    const router = Taro.getStorageSync('router')
295
+    const hFiveId = this.$router.params.id || router.query.id || ""
294 296
     const webUrlParams = [
295 297
       `personId=${person.personId}`,
296
-      `h5id=${this.$router.params.id}`,
298
+      `h5id=${hFiveId}`,
297 299
       `consultant=${consultant}`,
298 300
       `codeParams=${encodeURIComponent(codeParams)}`,
299 301
     ].join('&')