|
@@ -32,7 +32,7 @@ export default class HouseList extends Component {
|
32
|
32
|
showShareMenu: false,
|
33
|
33
|
showPoster: false,
|
34
|
34
|
tipsList: [],
|
35
|
|
- houseList: [],
|
|
35
|
+ houseList: [{}],
|
36
|
36
|
id: null,
|
37
|
37
|
qrcodeParams: {},
|
38
|
38
|
current: 0,
|
|
@@ -50,6 +50,8 @@ export default class HouseList extends Component {
|
50
|
50
|
posterConfig: [],
|
51
|
51
|
consultData: {}, // 分享的置业顾问信息
|
52
|
52
|
consultShow: false, // 置业顾问悬浮框显示隐藏
|
|
53
|
+ noRecord: false,
|
|
54
|
+
|
53
|
55
|
}
|
54
|
56
|
|
55
|
57
|
componentDidShow() {
|
|
@@ -85,7 +87,11 @@ export default class HouseList extends Component {
|
85
|
87
|
}
|
86
|
88
|
}
|
87
|
89
|
initPageData() {
|
88
|
|
- Taro.showLoading()
|
|
90
|
+ // Taro.showLoading({ mask: true, title: '加载中...' });
|
|
91
|
+ Taro.showToast({
|
|
92
|
+ title: '加载中...',
|
|
93
|
+ icon: 'loading'
|
|
94
|
+ })
|
89
|
95
|
const id = this.$router.params.id
|
90
|
96
|
|
91
|
97
|
if (this.$router.params.scene) {
|
|
@@ -125,10 +131,13 @@ export default class HouseList extends Component {
|
125
|
131
|
queryHouseList(params).then(res => {
|
126
|
132
|
this.setState({
|
127
|
133
|
houseList: this.groupHouseList(res) || []
|
|
134
|
+ }, () => {
|
|
135
|
+ Taro.hideToast()
|
128
|
136
|
})
|
129
|
|
- Taro.hideLoading()
|
|
137
|
+
|
|
138
|
+
|
130
|
139
|
}).catch(err => {
|
131
|
|
- Taro.hideLoading()
|
|
140
|
+ Taro.hideToast()
|
132
|
141
|
Taro.showToast({ title: '未找到房源批次', icon: 'none', duration: 2000 })
|
133
|
142
|
})
|
134
|
143
|
}
|
|
@@ -139,9 +148,11 @@ export default class HouseList extends Component {
|
139
|
148
|
})
|
140
|
149
|
})
|
141
|
150
|
querySalesInfo(id).then(res => {
|
|
151
|
+
|
142
|
152
|
this.setState({
|
143
|
153
|
buildingId: res.buildingId,
|
144
|
154
|
salesBatchDetail: res || {},
|
|
155
|
+ noRecord: res.status == '1' ? false : true
|
145
|
156
|
})
|
146
|
157
|
const { templates = [], posterImg = '' } = (res.posters || [])[0]
|
147
|
158
|
|
|
@@ -557,13 +568,13 @@ export default class HouseList extends Component {
|
557
|
568
|
const {
|
558
|
569
|
consultData,
|
559
|
570
|
consultShow,
|
560
|
|
- salesBatchDetail,
|
561
|
571
|
showShareMenu,
|
562
|
572
|
showPoster,
|
563
|
573
|
houseList,
|
564
|
574
|
conditionVisible,
|
565
|
575
|
posterData,
|
566
|
576
|
posterConfig,
|
|
577
|
+ noRecord,
|
567
|
578
|
} = this.state
|
568
|
579
|
|
569
|
580
|
const { userInfo: { person } } = this.props
|
|
@@ -581,12 +592,12 @@ export default class HouseList extends Component {
|
581
|
592
|
}
|
582
|
593
|
{/* 生成海报 */}
|
583
|
594
|
{showPoster && <Poster data={posterData} configs={posterConfig} onCancel={this.togglePosterStatus} onFinish={this.togglePosterStatus} ></Poster>}
|
584
|
|
- {salesBatchDetail.status == "1" ?
|
|
595
|
+ {!noRecord ?
|
585
|
596
|
<Block>
|
586
|
597
|
{!conditionVisible && <Block>
|
587
|
598
|
<View className="houselist">
|
588
|
599
|
{this.renderBar()}
|
589
|
|
- {!houseList.length ? this.renderBlank() : this.renderHouses()}
|
|
600
|
+ {houseList.length ? this.renderHouses() : this.renderBlank()}
|
590
|
601
|
{this.renderBottom()}
|
591
|
602
|
</View>
|
592
|
603
|
{/* 分享按钮 */}
|