|
@@ -19,8 +19,8 @@ import { ROLE_CODE } from '@/constants/user'
|
19
|
19
|
import { report as reportCustomer } from '@/utils/customer'
|
20
|
20
|
import { getMiniQrcode, savePoint, updatePoint } from '@/services/common'
|
21
|
21
|
import { getCanvasConfig } from '@/utils/tools'
|
22
|
|
-// import Consultant from '@/components/consultant'
|
23
|
|
-
|
|
22
|
+import { getCardDetail } from '@/services/card'
|
|
23
|
+import Consultant from '@/components/consultant'
|
24
|
24
|
import './index.scss'
|
25
|
25
|
|
26
|
26
|
@connect(s => s.user)
|
|
@@ -48,6 +48,8 @@ export default class HouseList extends Component {
|
48
|
48
|
buildingId: null,
|
49
|
49
|
salesBatchDetail: {},
|
50
|
50
|
posterConfig: [],
|
|
51
|
+ consultData: {}, // 分享的置业顾问信息
|
|
52
|
+ consultShow: false, // 置业顾问悬浮框显示隐藏
|
51
|
53
|
}
|
52
|
54
|
|
53
|
55
|
componentDidShow() {
|
|
@@ -99,6 +101,16 @@ export default class HouseList extends Component {
|
99
|
101
|
}
|
100
|
102
|
|
101
|
103
|
this.reportClientFn()
|
|
104
|
+ let { qrcodeParams } = this.state
|
|
105
|
+ const consultant = this.$router.params.consultant || qrcodeParams.consultant
|
|
106
|
+ if (consultant) {
|
|
107
|
+ getCardDetail(consultant).then(res => {
|
|
108
|
+ this.setState({
|
|
109
|
+ consultData: res,
|
|
110
|
+ consultShow: true
|
|
111
|
+ })
|
|
112
|
+ })
|
|
113
|
+ }
|
102
|
114
|
}
|
103
|
115
|
getInfo(id) {
|
104
|
116
|
const { startPrice, endPrice, apartmentId } = this.state
|
|
@@ -402,6 +414,7 @@ export default class HouseList extends Component {
|
402
|
414
|
priceCurrent: item.value,
|
403
|
415
|
startPrice: item.startPrice,
|
404
|
416
|
endPrice: item.endPrice,
|
|
417
|
+ apartmentId: '',
|
405
|
418
|
conditionVisible: false
|
406
|
419
|
}, () => {
|
407
|
420
|
const id = this.$router.params.id || this.state.id
|
|
@@ -416,7 +429,8 @@ export default class HouseList extends Component {
|
416
|
429
|
}
|
417
|
430
|
sureFilter() {
|
418
|
431
|
this.setState({
|
419
|
|
- conditionVisible: false
|
|
432
|
+ conditionVisible: false,
|
|
433
|
+ apartmentId: ''
|
420
|
434
|
}, () => {
|
421
|
435
|
// Taro.setNavigationBarTitle({ title: '房源' })
|
422
|
436
|
const id = this.$router.params.id || this.state.id
|
|
@@ -480,6 +494,8 @@ export default class HouseList extends Component {
|
480
|
494
|
apartmentFilter(apartmentId) {
|
481
|
495
|
this.setState({
|
482
|
496
|
apartmentId,
|
|
497
|
+ startPrice: '',
|
|
498
|
+ endPrice: '',
|
483
|
499
|
conditionVisible: false,
|
484
|
500
|
}, () => {
|
485
|
501
|
// Taro.setNavigationBarTitle({ title: '房源' })
|
|
@@ -538,7 +554,18 @@ export default class HouseList extends Component {
|
538
|
554
|
}
|
539
|
555
|
|
540
|
556
|
render() {
|
541
|
|
- const { salesBatchDetail, showShareMenu, showPoster, houseList, conditionVisible, posterData, posterShow, posterConfig } = this.state
|
|
557
|
+ const {
|
|
558
|
+ consultData,
|
|
559
|
+ consultShow,
|
|
560
|
+ salesBatchDetail,
|
|
561
|
+ showShareMenu,
|
|
562
|
+ showPoster,
|
|
563
|
+ houseList,
|
|
564
|
+ conditionVisible,
|
|
565
|
+ posterData,
|
|
566
|
+ posterConfig,
|
|
567
|
+ } = this.state
|
|
568
|
+
|
542
|
569
|
const { userInfo: { person } } = this.props
|
543
|
570
|
|
544
|
571
|
const showCircleBtn = posterData && posterData.qrcode
|
|
@@ -548,7 +575,10 @@ export default class HouseList extends Component {
|
548
|
575
|
{conditionVisible && this.renderCondition()}
|
549
|
576
|
{/* 授权电话与头像 */}
|
550
|
577
|
<GrantProfile both person={person} />
|
551
|
|
-
|
|
578
|
+ {/* 置业顾问悬框 */}
|
|
579
|
+ {
|
|
580
|
+ consultShow && <Consultant style="bottom:150rpx" smallStyle="bottom:178rpx" personId={person.personId} name={person.name || person.nickname} data={consultData}></Consultant>
|
|
581
|
+ }
|
552
|
582
|
{/* 生成海报 */}
|
553
|
583
|
{showPoster && <Poster data={posterData} configs={posterConfig} onCancel={this.togglePosterStatus} onFinish={this.togglePosterStatus} ></Poster>}
|
554
|
584
|
{salesBatchDetail.status == "1" ?
|