林凡 5 年前
父节点
当前提交
d7458fc100

+ 1
- 1
config/dev.js 查看文件

10
     // HOST: '"https://lt.pawoma.cn"',
10
     // HOST: '"https://lt.pawoma.cn"',
11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12
     // HOST: '"http://192.168.2.51:8080"',
12
     // HOST: '"http://192.168.2.51:8080"',
13
-    // WSS_HOST: '"http://192.168.2.51:8080"',
13
+    // WSS_HOST: '"ws://192.168.2.51:8080"',
14
     Version: 'V3.5.3'
14
     Version: 'V3.5.3'
15
   },
15
   },
16
   weapp: {},
16
   weapp: {},

二进制
src/assets/goto.png 查看文件


二进制
src/assets/location.png 查看文件


+ 6
- 4
src/components/amap/PoiAround.js 查看文件

5
 const centerIcon = require('@assets/dingwei.png')
5
 const centerIcon = require('@assets/dingwei.png')
6
 const centerProject = 'project-999'
6
 const centerProject = 'project-999'
7
 
7
 
8
-function ObjEqual (a = {}, b = {}) { return JSON.stringify(a) === JSON.stringify(b) }
8
+function ObjEqual(a = {}, b = {}) { return JSON.stringify(a) === JSON.stringify(b) }
9
 
9
 
10
 export default class PoiAround extends Component {
10
 export default class PoiAround extends Component {
11
   map = null;
11
   map = null;
12
 
12
 
13
-  componentDidMount () {
13
+  componentDidMount() {
14
     this.map = wx.createMapContext('poi-around', this)
14
     this.map = wx.createMapContext('poi-around', this)
15
   }
15
   }
16
 
16
 
17
-  componentWillReceiveProps (nextProps) {
17
+  componentWillReceiveProps(nextProps) {
18
     if (this.map) {
18
     if (this.map) {
19
       if (!ObjEqual(nextProps.markers, this.props.markers)) {
19
       if (!ObjEqual(nextProps.markers, this.props.markers)) {
20
         this.map.moveToLocation({
20
         this.map.moveToLocation({
33
   }
33
   }
34
 
34
 
35
   render() {
35
   render() {
36
-    const markers =  (this.props.markers || []).map((marker, index) => {
36
+    const markers = (this.props.markers || []).map((marker, index) => {
37
       const icon = icons[index].normal
37
       const icon = icons[index].normal
38
       const activeIcon = icons[index].active
38
       const activeIcon = icons[index].active
39
 
39
 
68
         latitude={this.props.latitude}
68
         latitude={this.props.latitude}
69
         onMarkerTap={this.handleTap}
69
         onMarkerTap={this.handleTap}
70
         style={this.props.style}
70
         style={this.props.style}
71
+        enable-scroll={this.props.coverShow ? false : true}
72
+        enable-zoom={this.props.coverShow ? false : true}
71
       />
73
       />
72
     )
74
     )
73
   }
75
   }

+ 34
- 12
src/pages/activity/detail/assemble.js 查看文件

8
 import FormIdCollector from '@components/formIdCollector'
8
 import FormIdCollector from '@components/formIdCollector'
9
 import dayjs from 'dayjs'
9
 import dayjs from 'dayjs'
10
 // import WxParse from '@components/wxParse/wxParse'
10
 // import WxParse from '@components/wxParse/wxParse'
11
-// import getUserPhone from '@utils/getUserPhone'
12
 import ready from '@utils/ready'
11
 import ready from '@utils/ready'
13
 import { getDownloadURL, times, formateLeftTime, getCanvasConfig, transferImage } from '@utils/tools'
12
 import { getDownloadURL, times, formateLeftTime, getCanvasConfig, transferImage } from '@utils/tools'
14
 import { getQrCodeParams } from '@utils/qrcode'
13
 import { getQrCodeParams } from '@utils/qrcode'
27
 import { ROLE_CODE } from '@constants/user'
26
 import { ROLE_CODE } from '@constants/user'
28
 import Consultant from '@components/consultant'
27
 import Consultant from '@components/consultant'
29
 import * as noticeType from '@constants/common.js'
28
 import * as noticeType from '@constants/common.js'
29
+import { reportClient } from '@services/report'
30
 
30
 
31
 const waitImg = require('@assets/helpgroup/wait.png')
31
 const waitImg = require('@assets/helpgroup/wait.png')
32
 const memberImg = require('@assets/helpgroup/group/member.png')
32
 const memberImg = require('@assets/helpgroup/group/member.png')
84
       }
84
       }
85
       this.initPageData()
85
       this.initPageData()
86
     })
86
     })
87
-    const router = Taro.getStorageSync('router')
88
-    const consultant = this.$router.params.consultant || router.query.consultant
89
-    if (consultant) {
90
-      getCardDetail(consultant).then(res => {
91
-        this.setState({
92
-          consultData: res,
93
-          consultShow: true
94
-        })
95
-      })
96
-    }
97
   }
87
   }
98
 
88
 
99
   componentWillUnmount() {
89
   componentWillUnmount() {
296
       }, () => this.startTicker())
286
       }, () => this.startTicker())
297
 
287
 
298
       // Taro.setNavigationBarTitle({ title: res.taShareActivity.activityName })
288
       // Taro.setNavigationBarTitle({ title: res.taShareActivity.activityName })
299
-
300
       // WxParse.wxParse('article', 'html', res.desc, this.$scope, 0)
289
       // WxParse.wxParse('article', 'html', res.desc, this.$scope, 0)
301
 
290
 
302
       savePoint({
291
       savePoint({
310
         this.setState({ pointRecordId: res.recordId })
299
         this.setState({ pointRecordId: res.recordId })
311
       })
300
       })
312
     })
301
     })
302
+    const router = Taro.getStorageSync('router')
303
+    const consultant = this.$router.params.consultant || router.query.consultant
304
+    if (consultant) {
305
+      this.reportClientFn()
306
+      getCardDetail(consultant).then(res => {
307
+        this.setState({
308
+          consultData: res,
309
+          consultShow: true
310
+        })
311
+      })
312
+    }
313
+  }
314
+   // 报备客户
315
+   reportClientFn() {
316
+
317
+    const router = Taro.getStorageSync('router') || { query: {} }
318
+    const consultant = this.$router.params.consultant || router.query.consultant || ""
319
+    const { userInfo: { person: { phone, tel, userId } } } = this.props
320
+
321
+    if (consultant && consultant != userId) {
322
+      const realPhone = phone || tel
323
+      const payload = {
324
+        realtyConsultant: consultant, //报备人 置业顾问
325
+        phone: realPhone,
326
+        showToast: false
327
+      }
328
+      reportClient(payload).then(res => {
329
+        console.log('恭喜您绑定成功')
330
+      }).catch(err => {
331
+        console.error(err)
332
+      })
333
+    }
313
   }
334
   }
314
 
335
 
315
   currentPageAndParams() {
336
   currentPageAndParams() {
368
     }
389
     }
369
   }
390
   }
370
 
391
 
392
+
371
   // 立即参团
393
   // 立即参团
372
   joinGroup = () => {
394
   joinGroup = () => {
373
     const { userInfo: { miniApp: { tpls } } } = this.props
395
     const { userInfo: { miniApp: { tpls } } } = this.props

+ 37
- 11
src/pages/activity/detail/assistance.js 查看文件

26
 import { getCardDetail } from '@services/card'
26
 import { getCardDetail } from '@services/card'
27
 import { ROLE_CODE } from '@constants/user'
27
 import { ROLE_CODE } from '@constants/user'
28
 import Consultant from '@components/consultant'
28
 import Consultant from '@components/consultant'
29
+<<<<<<< HEAD
29
 import * as noticeType from '@constants/common.js'
30
 import * as noticeType from '@constants/common.js'
31
+=======
32
+import { reportClient } from '@services/report'
33
+>>>>>>> a3f7df9baf06351593fb04059e798f0df825cfc3
30
 
34
 
31
 const successImg = 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/helpgroup/help/success2.png'
35
 const successImg = 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/helpgroup/help/success2.png'
32
 const failImg = 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/helpgroup/help/help%20failure.png'
36
 const failImg = 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/helpgroup/help/help%20failure.png'
83
       }
87
       }
84
 
88
 
85
       this.initPageData()
89
       this.initPageData()
86
-      const router = Taro.getStorageSync('router')
87
-      const consultant = this.$router.params.consultant || router.query.consultant
88
-      if (consultant) {
89
-        getCardDetail(consultant).then(res => {
90
-          this.setState({
91
-            consultData: res,
92
-            consultShow: true
93
-          })
94
-        })
95
-      }
90
+
96
     })
91
     })
97
   }
92
   }
98
 
93
 
298
       }, () => this.startTicker())
293
       }, () => this.startTicker())
299
 
294
 
300
       // Taro.setNavigationBarTitle({ title: res.helpActivity.title })
295
       // Taro.setNavigationBarTitle({ title: res.helpActivity.title })
301
-
302
       // WxParse.wxParse('article', 'html', res.desc, this.$scope, 0)
296
       // WxParse.wxParse('article', 'html', res.desc, this.$scope, 0)
303
 
297
 
304
       savePoint({
298
       savePoint({
312
         this.setState({ pointRecordId: res.recordId })
306
         this.setState({ pointRecordId: res.recordId })
313
       })
307
       })
314
     })
308
     })
309
+    const router = Taro.getStorageSync('router')
310
+    const consultant = this.$router.params.consultant || router.query.consultant
311
+    if (consultant) {
312
+      this.reportClientFn()
313
+      getCardDetail(consultant).then(res => {
314
+        this.setState({
315
+          consultData: res,
316
+          consultShow: true
317
+        })
318
+      })
319
+    }
320
+  }
321
+  // 报备客户
322
+  reportClientFn() {
323
+
324
+    const router = Taro.getStorageSync('router') || { query: {} }
325
+    const consultant = this.$router.params.consultant || router.query.consultant || ""
326
+    const { userInfo: { person: { phone, tel, userId } } } = this.props
327
+
328
+    if (consultant && consultant != userId) {
329
+      const realPhone = phone || tel
330
+      const payload = {
331
+        realtyConsultant: consultant, //报备人 置业顾问
332
+        phone: realPhone,
333
+        showToast: false
334
+      }
335
+      reportClient(payload).then(res => {
336
+        console.log('恭喜您绑定成功')
337
+      }).catch(err => {
338
+        console.error(err)
339
+      })
340
+    }
315
   }
341
   }
316
 
342
 
317
   currentPageAndParams() {
343
   currentPageAndParams() {

+ 35
- 11
src/pages/activity/detail/index.js 查看文件

25
   updatePoint
25
   updatePoint
26
 } from '@services/common'
26
 } from '@services/common'
27
 import { connect } from '@tarojs/redux'
27
 import { connect } from '@tarojs/redux'
28
+import { reportClient } from '@services/report'
28
 
29
 
29
 @connect(state => state.user)
30
 @connect(state => state.user)
30
 export default class Detail extends Component {
31
 export default class Detail extends Component {
53
   componentWillMount() {
54
   componentWillMount() {
54
     ready.queue(() => {
55
     ready.queue(() => {
55
       const router = Taro.getStorageSync('router')
56
       const router = Taro.getStorageSync('router')
56
-      const consultant = this.$router.params.consultant || router.query.consultant
57
-      if (consultant) {
58
-        getCardDetail(consultant).then(res => {
59
-          this.setState({
60
-            consultData: res,
61
-            consultShow: true
62
-          })
63
-        })
64
-      }
65
       const id = this.$router.params.id || router.query.id
57
       const id = this.$router.params.id || router.query.id
66
       if (!id) {
58
       if (!id) {
67
         getQrCodeParams(this.$router.params.scene).then(res => {
59
         getQrCodeParams(this.$router.params.scene).then(res => {
123
         console.log('活动详情')
115
         console.log('活动详情')
124
       })
116
       })
125
     })
117
     })
118
+    const router = Taro.getStorageSync('router')
119
+    const consultant = this.$router.params.consultant || router.query.consultant
120
+    if (consultant) {
121
+      this.reportClientFn()
122
+      getCardDetail(consultant).then(res => {
123
+        this.setState({
124
+          consultData: res,
125
+          consultShow: true
126
+        })
127
+      })
128
+    }
129
+  }
130
+  // 报备客户
131
+  reportClientFn() {
132
+
133
+    const router = Taro.getStorageSync('router') || { query: {} }
134
+    const consultant = this.$router.params.consultant || router.query.consultant || ""
135
+    const { userInfo: { person: { phone, tel, userId } } } = this.props
136
+
137
+    if (consultant && consultant != userId) {
138
+      const realPhone = phone || tel
139
+      const payload = {
140
+        realtyConsultant: consultant, //报备人 置业顾问
141
+        phone: realPhone,
142
+        showToast: false
143
+      }
144
+      reportClient(payload).then(res => {
145
+        console.log('恭喜您绑定成功')
146
+      }).catch(err => {
147
+        console.error(err)
148
+      })
149
+    }
126
   }
150
   }
127
   onShareAppMessage = () => {
151
   onShareAppMessage = () => {
128
     const { detail: { shareContents, title, dynamicId, url } } = this.state
152
     const { detail: { shareContents, title, dynamicId, url } } = this.state
226
       const { detail: { dynamicId, posters, createDate } } = this.state
250
       const { detail: { dynamicId, posters, createDate } } = this.state
227
       const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
251
       const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
228
       const phoneNum = phone || tel
252
       const phoneNum = phone || tel
229
-      
253
+
230
       const payload = {
254
       const payload = {
231
         "scene": `id=${dynamicId}&from=dynamic_share&recommender=${personId}&consultant=${consultant}&phoneNum=${phoneNum}`,
255
         "scene": `id=${dynamicId}&from=dynamic_share&recommender=${personId}&consultant=${consultant}&phoneNum=${phoneNum}`,
232
         "page": 'pages/activity/detail/index',
256
         "page": 'pages/activity/detail/index',
233
       }
257
       }
234
-   
258
+
235
       // debugger
259
       // debugger
236
       const _avatarurl = getDownloadURL(avatarurl, 'avatar');
260
       const _avatarurl = getDownloadURL(avatarurl, 'avatar');
237
       getMiniQrcode(payload).then(qrcode => {
261
       getMiniQrcode(payload).then(qrcode => {

+ 0
- 1
src/pages/card/index.js 查看文件

361
       return
361
       return
362
     }
362
     }
363
     const buildingId = projects[0]
363
     const buildingId = projects[0]
364
-
365
     const realPhone = phoneNumber || phone || tel
364
     const realPhone = phoneNumber || phone || tel
366
 
365
 
367
     // TODO:
366
     // TODO:

+ 34
- 10
src/pages/news/detail/index.js 查看文件

12
 import { getCardDetail } from '@services/card'
12
 import { getCardDetail } from '@services/card'
13
 import { ROLE_CODE } from '@constants/user'
13
 import { ROLE_CODE } from '@constants/user'
14
 import Consultant from '@components/consultant'
14
 import Consultant from '@components/consultant'
15
+import { reportClient } from '@services/report'
15
 import {
16
 import {
16
   addNewsUv,
17
   addNewsUv,
17
   favorNews,
18
   favorNews,
49
 
50
 
50
       const newsId = this.$router.params.id || router.query.id
51
       const newsId = this.$router.params.id || router.query.id
51
 
52
 
52
-      const consultant = this.$router.params.consultant || router.query.consultant
53
-      if (consultant) {
54
-        getCardDetail(consultant).then(res => {
55
-          this.setState({
56
-            consultData: res,
57
-            consultShow: true
58
-          })
59
-        })
60
-      }
61
       if (!newsId) {
53
       if (!newsId) {
62
         getQrCodeParams(this.$router.params.scene).then(res => {
54
         getQrCodeParams(this.$router.params.scene).then(res => {
63
           this.setState({ newsId: res.id }, () => {
55
           this.setState({ newsId: res.id }, () => {
83
     const { recordId } = this.state
75
     const { recordId } = this.state
84
     recordId && updatePoint(recordId)
76
     recordId && updatePoint(recordId)
85
   }
77
   }
78
+  // 报备客户
79
+  reportClientFn() {
80
+
81
+    const router = Taro.getStorageSync('router') || { query: {} }
82
+    const consultant = this.$router.params.consultant || router.query.consultant || ""
83
+    const { userInfo: { person: { phone, tel, userId } }} = this.props
84
+
85
+    if (consultant && consultant != userId) {
86
+      const realPhone = phone || tel
87
+      const payload = {
88
+        realtyConsultant: consultant, //报备人 置业顾问
89
+        phone: realPhone,
90
+        showToast: false
91
+      }
92
+      reportClient(payload).then(res => {
93
+        console.log('恭喜您绑定成功')
94
+      }).catch(err => {
95
+        console.error(err)
96
+      })
97
+    }
98
+  }
86
 
99
 
87
   handleFavor() {
100
   handleFavor() {
88
     const { newsId, isSaved } = this.state
101
     const { newsId, isSaved } = this.state
131
       propertyName: '资讯详情分享',
144
       propertyName: '资讯详情分享',
132
       consultantId: consultantId,
145
       consultantId: consultantId,
133
       sharePersonId: personId,
146
       sharePersonId: personId,
134
-      targetId:newsId,
147
+      targetId: newsId,
135
       data: '{}'
148
       data: '{}'
136
     }).then(res => {
149
     }).then(res => {
137
       console.info('资讯详情分享')
150
       console.info('资讯详情分享')
181
         console.info('资讯详情')
194
         console.info('资讯详情')
182
       })
195
       })
183
     })
196
     })
197
+    const router = Taro.getStorageSync('router')
198
+    const consultant = this.$router.params.consultant || router.query.consultant
199
+    if (consultant) {
200
+      this.reportClientFn()
201
+      getCardDetail(consultant).then(res => {
202
+        this.setState({
203
+          consultData: res,
204
+          consultShow: true
205
+        })
206
+      })
207
+    }
184
   }
208
   }
185
   getPosterData = () => {
209
   getPosterData = () => {
186
     return new Promise(resolve => {
210
     return new Promise(resolve => {

+ 0
- 2
src/pages/project/detail/Around/Pannel.js 查看文件

77
     const { manualData = [] } = this.props.dataset || {}
77
     const { manualData = [] } = this.props.dataset || {}
78
     const activeKey = this.props.active
78
     const activeKey = this.props.active
79
 
79
 
80
-    const fixdHeight = this.props.style || 'height: 300rpx'
81
-
82
     return (
80
     return (
83
       // <ScrollView scrollY style={fixdHeight} scrollTop={this.state.currentMarkerPos} onScroll={this.bindScroll}>
81
       // <ScrollView scrollY style={fixdHeight} scrollTop={this.state.currentMarkerPos} onScroll={this.bindScroll}>
84
         <View className="around-pannel">
82
         <View className="around-pannel">

+ 1
- 3
src/pages/project/detail/Around/around.js 查看文件

66
     return (
66
     return (
67
         <View className="around-box">
67
         <View className="around-box">
68
             <View className="around-header">
68
             <View className="around-header">
69
-                <CoverView style="width: 100%; height: 100%;">
70
-                    <PoiAround style="width: 100vw; height: 500rpx;" current={curMarker} markers={markers} longitude={lng} latitude={lat} onMarkerClick={handleMarkerTap} />
71
-                </CoverView>
69
+                <PoiAround style="width: 100vw; height: 500rpx;" current={curMarker} coverShow={true} markers={markers} longitude={lng} latitude={lat} onMarkerClick={handleMarkerTap} />
72
             </View>
70
             </View>
73
             <View className="around-body">
71
             <View className="around-body">
74
                 <Tab dataset={dataList} className="around-project" onChange={handleTabChange} />
72
                 <Tab dataset={dataList} className="around-project" onChange={handleTabChange} />

+ 4
- 4
src/pages/project/detail/Around/index.js 查看文件

67
   return (
67
   return (
68
     <View >
68
     <View >
69
       <View style="  position: fixed;top: 0; width: 100%; height: 840rpx;">
69
       <View style="  position: fixed;top: 0; width: 100%; height: 840rpx;">
70
-        <PoiAround style="width: 100vw; height: 840rpx;" current={curMarker} markers={markers} longitude={lng} latitude={lat} onMarkerClick={handleMarkerTap} />
70
+        <PoiAround style="width: 100vw; height: 840rpx;" coverShow={false} current={curMarker} markers={markers} longitude={lng} latitude={lat} onMarkerClick={handleMarkerTap} />
71
       </View>
71
       </View>
72
       <ScrollView
72
       <ScrollView
73
         enableBackToTop
73
         enableBackToTop
74
-        style=" padding-top: 830rpx; background: transparent;"
74
+        style=" padding-top: 800rpx; background: transparent;"
75
         scrollY>
75
         scrollY>
76
         <View className="around-box" style="border-radius: 40rpx 40rpx 0 0;">
76
         <View className="around-box" style="border-radius: 40rpx 40rpx 0 0;">
77
           <View className="building-con">
77
           <View className="building-con">
78
             <View>
78
             <View>
79
               <View className="building-name">{detail.buildingName}</View>
79
               <View className="building-name">{detail.buildingName}</View>
80
-              <View className="building-address">{detail.address}</View>
80
+              <View className="building-address"><Image className="location" src={require('@assets/location.png')}></Image>{detail.address}</View>
81
             </View>
81
             </View>
82
-            <View className="building-go" onClick={goto}>前往</View>
82
+            <View className="building-go" onClick={goto}>前往<Image className="goto" src={require('@assets/goto.png')}></Image></View>
83
           </View>
83
           </View>
84
           <View className="around-body">
84
           <View className="around-body">
85
             <Tab dataset={dataList} className="around-tab" onChange={handleTabChange} />
85
             <Tab dataset={dataList} className="around-tab" onChange={handleTabChange} />

+ 14
- 1
src/pages/project/detail/Around/style.scss 查看文件

130
     font-size: 36px;
130
     font-size: 36px;
131
     color: #333;
131
     color: #333;
132
   }
132
   }
133
+  .location{
134
+    width: 25px;
135
+    height: 30px;
136
+    margin-right: 10px;
137
+  }
133
   .building-address{
138
   .building-address{
134
     font-size: 28px;
139
     font-size: 28px;
135
     color: #666;
140
     color: #666;
141
+    margin-top: 8px;
142
+    width: 520px;
136
   }
143
   }
137
   .building-go{
144
   .building-go{
138
-    width:130px;
139
     height:72px;
145
     height:72px;
140
     line-height: 72px;
146
     line-height: 72px;
141
     background:rgba(246,182,29,1);
147
     background:rgba(246,182,29,1);
143
     font-size: 28px;
149
     font-size: 28px;
144
     color:#fff;
150
     color:#fff;
145
     padding:0 20px;
151
     padding:0 20px;
152
+    display: flex;
153
+    align-items: center;
154
+    .goto{
155
+      width:44px;
156
+      height:44px;
157
+      margin-left: 20px;
158
+    }
146
   }
159
   }
147
 }
160
 }

+ 79
- 63
src/pages/project/detail/index.js 查看文件

4
 import Banner from '../banner'
4
 import Banner from '../banner'
5
 import HelpGroupBanner from '../swiper'
5
 import HelpGroupBanner from '../swiper'
6
 import Poster from './poster'
6
 import Poster from './poster'
7
-
7
+import { reportClient } from '@services/report'
8
 import Around from './Around/around'
8
 import Around from './Around/around'
9
 import BackHomeBtn from '@components/BackHomeBtn'
9
 import BackHomeBtn from '@components/BackHomeBtn'
10
 import AchievePhone from '@components/achievePhone'
10
 import AchievePhone from '@components/achievePhone'
76
       // console.log('-------options----->', options)
76
       // console.log('-------options----->', options)
77
       // if (sceneInShare(options.scene)) {
77
       // if (sceneInShare(options.scene)) {
78
       const router = Taro.getStorageSync('router')
78
       const router = Taro.getStorageSync('router')
79
-      const consultant = this.$router.params.consultant || router.query.consultant
80
-      if (consultant) {
81
-        console.log(consultant, "$$$$$$$$$$$$$$$$$$$$$$$$$$$4444")
82
-        getCardDetail(consultant).then(res => {
83
-          console.log(res, "$$$$$$$$$$$$$$$$$$$$$$$$$$$")
84
-          this.setState({
85
-            consultData: res,
86
-            consultShow: true
87
-          })
88
-        })
89
-      }
90
       const { person = {} } = this.props.userInfo || {}
79
       const { person = {} } = this.props.userInfo || {}
91
       console.log('-------person----->', person)
80
       console.log('-------person----->', person)
92
       if ((person.tel || person.phone) && (person.avatarurl || '').indexOf('wx.qlogo.cn') === -1) {
81
       if ((person.tel || person.phone) && (person.avatarurl || '').indexOf('wx.qlogo.cn') === -1) {
93
         Taro.reLaunch({ url: '/pages/auth/index' })
82
         Taro.reLaunch({ url: '/pages/auth/index' })
94
         return
83
         return
95
       }
84
       }
96
-
97
       this.setState({
85
       this.setState({
98
         grantPhoneVisible: true,
86
         grantPhoneVisible: true,
99
       })
87
       })
100
       // }
88
       // }
101
 
89
 
102
-
103
       const id = this.$router.params.id || router.query.id
90
       const id = this.$router.params.id || router.query.id
104
 
91
 
105
       // 没有找到 id , 再重新找一次
92
       // 没有找到 id , 再重新找一次
122
     const { recordId } = this.state
109
     const { recordId } = this.state
123
     recordId && updatePoint(recordId)
110
     recordId && updatePoint(recordId)
124
   }
111
   }
112
+  // 报备客户
113
+  reportClientFn() {
114
+
115
+    const router = Taro.getStorageSync('router') || { query: {} }
116
+    const consultant = this.$router.params.consultant || router.query.consultant || ""
117
+    const {
118
+      userInfo: { person: { phone, tel, userId } }
119
+    } = this.props
120
+
121
+    if (consultant && consultant != userId) {
122
+      const realPhone = phone || tel
123
+      const payload = {
124
+        realtyConsultant: consultant, //报备人 置业顾问
125
+        phone: realPhone,
126
+        showToast: false
127
+      }
128
+      reportClient(payload).then(res => {
129
+        console.log('恭喜您绑定成功')
130
+      }).catch(err => {
131
+        console.error(err)
132
+      })
133
+    }
134
+  }
135
+  onShareAppMessage = () => {
136
+    const {
137
+      projectDetail: { shareContents, buildingName, buildingId, poster },
138
+      userInfo: { person: { personId, personType, userId } }
139
+    } = this.props
140
+    const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
141
+    // 分享埋点
142
+    addItemShareNum(buildingId)
143
+    savePoint({
144
+      event: 'share',
145
+      eventType: 'building',
146
+      propertyName: '项目详情分享',
147
+      consultantId: consultantId,
148
+      sharePersonId: personId,
149
+      targetId: buildingId,
150
+      data: '{}'
151
+    }).then(res => {
152
+      console.log('项目详情分享')
153
+    })
154
+    const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
155
+    return {
156
+      title: shareContents[0].shareContentTitle,//分享内容
157
+      path: `/pages/project/detail/index?id=${buildingId}&from=building_share&recommender=${personId}&consultant=${consultant}`,//分享地址
158
+      imageUrl: shareContents[0].shareContentImg
159
+    }
160
+  }
125
 
161
 
126
   initPageData(id) {
162
   initPageData(id) {
127
     console.log('----项目ID---->', id)
163
     console.log('----项目ID---->', id)
151
         console.log('项目详情')
187
         console.log('项目详情')
152
       })
188
       })
153
     })
189
     })
190
+    const router = Taro.getStorageSync('router')
191
+    const consultant = this.$router.params.consultant || router.query.consultant
192
+    if (consultant) {
193
+      this.reportClientFn()
194
+      getCardDetail(consultant).then(res => {
195
+        this.setState({
196
+          consultData: res,
197
+          consultShow: true
198
+        })
199
+      })
200
+    }
154
   }
201
   }
155
 
202
 
156
   loadHelpGroupList() {
203
   loadHelpGroupList() {
293
     this.navigateTo('/pages/card/fans/index?type=item&id=' + buildingId)
340
     this.navigateTo('/pages/card/fans/index?type=item&id=' + buildingId)
294
   }
341
   }
295
 
342
 
296
-  onShareAppMessage = () => {
297
-    console.log(this.props, "his.props")
298
-    const {
299
-      projectDetail: { shareContents, buildingName, buildingId, poster },
300
-      userInfo: { person: { personId, personType, userId } }
301
-    } = this.props
302
-    const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
303
-    // 分享埋点
304
-    addItemShareNum(buildingId)
305
-    savePoint({
306
-      event: 'share',
307
-      eventType: 'building',
308
-      propertyName: '项目详情分享',
309
-      consultantId: consultantId,
310
-      sharePersonId: personId,
311
-      targetId: buildingId,
312
-      data: '{}'
313
-    }).then(res => {
314
-      console.log('项目详情分享')
315
-    })
316
-    const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
317
-    return {
318
-      title: shareContents[0].shareContentTitle,//分享内容
319
-      path: `/pages/project/detail/index?id=${buildingId}&from=building_share&recommender=${personId}&consultant=${consultant}`,//分享地址
320
-      imageUrl: shareContents[0].shareContentImg
321
-    }
322
-  }
323
 
343
 
324
   getPhoneNumber(e, item) {
344
   getPhoneNumber(e, item) {
325
     getUserPhone(e, (phoneNumber) => {
345
     getUserPhone(e, (phoneNumber) => {
466
   }
486
   }
467
 
487
 
468
   toRecomonedPage() {
488
   toRecomonedPage() {
469
-    const {
470
-      userInfo: { person: { personType } }
471
-    } = this.props
472
-    if (personType === ROLE_CODE['DRIFT']) {
473
-      // 游客或者客户 区别是否有电话|| personType === ROLE_CODE['CUSTOMER']
474
-      Taro.navigateTo({
475
-        url: `/pages/agent/become/index`
476
-      })
477
-    } else {
478
-      Taro.navigateTo({
479
-        url: `/pages/agent/recommend/index?type=projectDeatil`
480
-      })
481
-    }
489
+    // const {
490
+    //   userInfo: { person: { personType } }
491
+    // } = this.props
492
+    // if (personType === ROLE_CODE['DRIFT']) {
493
+    //   // 游客或者客户 区别是否有电话|| personType === ROLE_CODE['CUSTOMER']
494
+    //   Taro.navigateTo({
495
+    //     url: `/pages/agent/become/index`
496
+    //   })
497
+    // } else {
498
+    Taro.navigateTo({
499
+      url: `/pages/agent/recommend/index?type=projectDeatil`
500
+    })
501
+    // }
482
   }
502
   }
483
 
503
 
484
   toHome() {
504
   toHome() {
690
 
710
 
691
     const listimg = list.filter(item => item.buildingImgList.length > 0)
711
     const listimg = list.filter(item => item.buildingImgList.length > 0)
692
 
712
 
693
-
694
     return (
713
     return (
695
-
696
-
697
-      <Block> {console.log(list, 'list')}
714
+      <Block>
698
         {listimg.length > 0 &&
715
         {listimg.length > 0 &&
699
           (
716
           (
700
             <View className='photos__type'>
717
             <View className='photos__type'>
708
                       const buildingImgList = item.buildingImgList
725
                       const buildingImgList = item.buildingImgList
709
                       const buildingImgUrl = buildingImgList.length > 0 ? buildingImgList[0].url : null
726
                       const buildingImgUrl = buildingImgList.length > 0 ? buildingImgList[0].url : null
710
 
727
 
711
-                      console.log(buildingImgUrl, 'buildingImgUrl')
728
+                      // console.log(buildingImgUrl, 'buildingImgUrl')
712
 
729
 
713
                       // if (buildingImgUrl != null) {
730
                       // if (buildingImgUrl != null) {
714
                       return (<View key={index + "listimg"}>
731
                       return (<View key={index + "listimg"}>
740
       </Block>
757
       </Block>
741
     )
758
     )
742
   }
759
   }
743
-  tomapDetail() {
760
+  tomapDetail(e) {
744
     const { buildingId } = this.state
761
     const { buildingId } = this.state
745
     Taro.navigateTo({
762
     Taro.navigateTo({
746
       url: `/pages/project/detail/map?id=` + buildingId
763
       url: `/pages/project/detail/map?id=` + buildingId
752
     }
769
     }
753
 
770
 
754
     return (
771
     return (
755
-      <View style="margin-bottom:-5px" onClick={this.tomapDetail}>
772
+      <View onClick={this.tomapDetail}>
756
         <View className="section circum">
773
         <View className="section circum">
757
           <View className="section-head">
774
           <View className="section-head">
758
             <Text className="section-head__title">位置及周边配套</Text>
775
             <Text className="section-head__title">位置及周边配套</Text>
959
         {
976
         {
960
           activityList.length > 0 && (
977
           activityList.length > 0 && (
961
             <View className="activity" >
978
             <View className="activity" >
962
-
963
               <View className="section-head">
979
               <View className="section-head">
964
                 <Text className="section-head__title" style={{ margin: '10rpx 0 40rpx 35rpx' }}>热门活动</Text>
980
                 <Text className="section-head__title" style={{ margin: '10rpx 0 40rpx 35rpx' }}>热门活动</Text>
965
                 <View className="section-head__more" style={{ marginRight: '20rpx' }} onClick={this.handleActivityMoreClick}>
981
                 <View className="section-head__more" style={{ marginRight: '20rpx' }} onClick={this.handleActivityMoreClick}>
1116
   }
1132
   }
1117
 
1133
 
1118
   changeCurrent(current) {
1134
   changeCurrent(current) {
1119
-    console.log(current, 'current')
1135
+    // console.log(current, 'current')
1120
     this.setState({
1136
     this.setState({
1121
       current: current + 1
1137
       current: current + 1
1122
     })
1138
     })

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

785
   position: fixed;
785
   position: fixed;
786
   top: 0;
786
   top: 0;
787
   width: 100%;
787
   width: 100%;
788
-  height: 600px;
788
+  height: 500px;
789
 
789
 
790
   &-img {
790
   &-img {
791
     width: 100%;
791
     width: 100%;

+ 1
- 26
src/pages/project/detail/map.js 查看文件

1
 import Taro, { Component } from '@tarojs/taro';
1
 import Taro, { Component } from '@tarojs/taro';
2
-import { View } from '@tarojs/components'
3
 import './index.scss'
2
 import './index.scss'
4
 import Around from './Around/index'
3
 import Around from './Around/index'
5
-import AchievePhone from '@components/achievePhone'
6
-import { savePoint, updatePoint } from '@services/common'
7
-import dayjs from 'dayjs'
4
+import { savePoint } from '@services/common'
8
 import 'dayjs/locale/zh-cn' // 按需加载
5
 import 'dayjs/locale/zh-cn' // 按需加载
9
 import ready from '@utils/ready'
6
 import ready from '@utils/ready'
10
-import { getQrCodeParams } from '@utils/qrcode'
11
 import { connect } from '@tarojs/redux'
7
 import { connect } from '@tarojs/redux'
12
 import { dispatchProjectDetail } from '@actions/project'
8
 import { dispatchProjectDetail } from '@actions/project'
13
 
9
 
33
 
29
 
34
         })
30
         })
35
     }
31
     }
36
-    componentWillUnmount() {
37
-        const { recordId } = this.state
38
-        recordId && updatePoint(recordId)
39
-    }
40
-
41
     initPageData(id) {
32
     initPageData(id) {
42
 
33
 
43
-        // const id='82b54f4a1f5b981df572253792afbfa1' 
44
         this.setState({
34
         this.setState({
45
             buildingId: id
35
             buildingId: id
46
         }, () => {
36
         }, () => {
47
             this.loadDetail()
37
             this.loadDetail()
48
-
49
-            // 埋点
50
-            //   savePoint({
51
-            //     event: 'detail',
52
-            //     eventType: 'building',
53
-            //     propertyName: '项目详情',
54
-            //     targetId: id,
55
-            //     buildingId: id,
56
-            //     data: '{}'
57
-            //   }).then(res => {
58
-            //     this.setState({
59
-            //       recordId: res.recordId
60
-            //     })
61
-            //     console.log('项目详情')
62
-            //   })
63
         })
38
         })
64
     }
39
     }
65
 
40