|
@@ -36,7 +36,7 @@ export default class HouseList extends Component {
|
36
|
36
|
id: null,
|
37
|
37
|
qrcodeParams: {},
|
38
|
38
|
current: 0,
|
39
|
|
- priceCurrent: 0,
|
|
39
|
+ priceCurrent: -1,
|
40
|
40
|
apartmentList: [],
|
41
|
41
|
conditionVisible: false,
|
42
|
42
|
startPrice: '',
|
|
@@ -45,22 +45,23 @@ export default class HouseList extends Component {
|
45
|
45
|
reportedCustomer: false,
|
46
|
46
|
posterShow: false,
|
47
|
47
|
posterData: {},
|
48
|
|
- shareContents: [],
|
49
|
48
|
buildingId: null,
|
|
49
|
+ salesBatchDetail: {},
|
50
|
50
|
posterConfig: [],
|
51
|
51
|
}
|
52
|
52
|
|
53
|
|
- componentWillMount() {
|
|
53
|
+ componentDidShow() {
|
54
|
54
|
|
55
|
55
|
ready.queue(() => {
|
56
|
56
|
|
57
|
57
|
this.initPageData()
|
58
|
58
|
})
|
59
|
59
|
}
|
|
60
|
+
|
60
|
61
|
componentWillReceiveProps() {
|
61
|
62
|
this.reportClientFn()
|
62
|
63
|
}
|
63
|
|
-
|
|
64
|
+
|
64
|
65
|
transTPLs2Configs(tpls, params) {
|
65
|
66
|
return tpls.map((tpl) => {
|
66
|
67
|
const conf = getCanvasConfig(tpl.configs, params)
|
|
@@ -126,14 +127,15 @@ export default class HouseList extends Component {
|
126
|
127
|
})
|
127
|
128
|
})
|
128
|
129
|
querySalesInfo(id).then(res => {
|
|
130
|
+ this.setState({
|
|
131
|
+ buildingId: res.buildingId,
|
|
132
|
+ salesBatchDetail: res || {},
|
|
133
|
+ })
|
129
|
134
|
const { templates = [], posterImg = '' } = (res.posters || [])[0]
|
130
|
135
|
|
131
|
136
|
this.setState({
|
132
|
|
- buildingId: res.buildingId,
|
133
|
137
|
posterData: { poster: posterImg },
|
134
|
|
- shareContents: res.shareContents || [],
|
135
|
138
|
}, () => {
|
136
|
|
- // debugger
|
137
|
139
|
this.getPosterData().then(posterData => {
|
138
|
140
|
const posterConfig = this.transTPLs2Configs(templates, posterData)
|
139
|
141
|
this.setState({ posterConfig, posterData })
|
|
@@ -234,7 +236,7 @@ export default class HouseList extends Component {
|
234
|
236
|
|
235
|
237
|
const queryParams = [
|
236
|
238
|
`id=${id}`,
|
237
|
|
- 'from=building_share',
|
|
239
|
+ 'from=house_share',
|
238
|
240
|
`recommender=${personId}`,
|
239
|
241
|
`consultant=${consultant}`,
|
240
|
242
|
`consultantId=${consultantId}`,
|
|
@@ -251,7 +253,7 @@ export default class HouseList extends Component {
|
251
|
253
|
const id = this.$router.params.id || this.state.id
|
252
|
254
|
const { userInfo: { person: { personId, personType, userId } } } = this.props
|
253
|
255
|
const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
|
254
|
|
- const { shareContents } = this.state
|
|
256
|
+ const { salesBatchDetail: { shareContents } } = this.state
|
255
|
257
|
const shareData = shareContents && shareContents.length ? shareContents[0] : { shareContentTitle: '房源列表', shareContentImg: null };
|
256
|
258
|
// 分享埋点
|
257
|
259
|
shareSavePoint({
|
|
@@ -262,7 +264,7 @@ export default class HouseList extends Component {
|
262
|
264
|
sharePersonId: personId,
|
263
|
265
|
targetId: id,
|
264
|
266
|
data: '{}'
|
265
|
|
- }, 'house')
|
|
267
|
+ }, 'houseApp')
|
266
|
268
|
|
267
|
269
|
const [page, params] = this.currentPageAndParams()
|
268
|
270
|
|
|
@@ -290,9 +292,9 @@ export default class HouseList extends Component {
|
290
|
292
|
propertyName: '生成房源列表海报',
|
291
|
293
|
targetId: id,
|
292
|
294
|
data: '{}'
|
293
|
|
- }, 'house')
|
|
295
|
+ }, 'housePoster')
|
294
|
296
|
})
|
295
|
|
-
|
|
297
|
+
|
296
|
298
|
|
297
|
299
|
} else {
|
298
|
300
|
this.setState({
|
|
@@ -300,7 +302,7 @@ export default class HouseList extends Component {
|
300
|
302
|
showShareMenu: false
|
301
|
303
|
})
|
302
|
304
|
}
|
303
|
|
-
|
|
305
|
+
|
304
|
306
|
|
305
|
307
|
}
|
306
|
308
|
getPosterData = () => {
|
|
@@ -345,7 +347,7 @@ export default class HouseList extends Component {
|
345
|
347
|
<Image style="width:50rpx;height:50rpx" src={require('../../assets/explain.png')}></Image>
|
346
|
348
|
</View>
|
347
|
349
|
<View onClick={this.handleSearchClick}>
|
348
|
|
- <Image style="width:50rpx;height:50rpx" src={require('../../assets/screen.png')}></Image>
|
|
350
|
+ <Image style="width:50rpx;height:50rpx" src={require('../../assets/screen.png')}></Image>
|
349
|
351
|
{/* <NamedIcon name="screen" size={50} /> */}
|
350
|
352
|
</View>
|
351
|
353
|
</View>
|
|
@@ -402,7 +404,6 @@ export default class HouseList extends Component {
|
402
|
404
|
endPrice: item.endPrice,
|
403
|
405
|
conditionVisible: false
|
404
|
406
|
}, () => {
|
405
|
|
- // Taro.setNavigationBarTitle({ title: '房源' })
|
406
|
407
|
const id = this.$router.params.id || this.state.id
|
407
|
408
|
this.getInfo(id)
|
408
|
409
|
})
|
|
@@ -462,7 +463,7 @@ export default class HouseList extends Component {
|
462
|
463
|
<Text style="margin:0 8rpx;color:#999;font-size:28rpx">-</Text>
|
463
|
464
|
<Input
|
464
|
465
|
type="number"
|
465
|
|
- placeholder="最低价"
|
|
466
|
+ placeholder="最高价"
|
466
|
467
|
class="search-input"
|
467
|
468
|
placeholder-style="color:#dcdcdc;font-size:28rpx"
|
468
|
469
|
maxlength="6"
|
|
@@ -537,11 +538,11 @@ export default class HouseList extends Component {
|
537
|
538
|
}
|
538
|
539
|
|
539
|
540
|
render() {
|
540
|
|
- const { showShareMenu, showPoster, houseList, conditionVisible, posterData, posterShow, posterConfig } = this.state
|
|
541
|
+ const { salesBatchDetail, showShareMenu, showPoster, houseList, conditionVisible, posterData, posterShow, posterConfig } = this.state
|
541
|
542
|
const { userInfo: { person } } = this.props
|
542
|
543
|
|
543
|
544
|
const showCircleBtn = posterData && posterData.qrcode
|
544
|
|
-console.log('==============>', posterData, showPoster, posterConfig)
|
|
545
|
+ console.log('==============>', posterData, showPoster, posterConfig)
|
545
|
546
|
return (
|
546
|
547
|
<Block>
|
547
|
548
|
{conditionVisible && this.renderCondition()}
|
|
@@ -550,23 +551,30 @@ console.log('==============>', posterData, showPoster, posterConfig)
|
550
|
551
|
|
551
|
552
|
{/* 生成海报 */}
|
552
|
553
|
{showPoster && <Poster data={posterData} configs={posterConfig} onCancel={this.togglePosterStatus} onFinish={this.togglePosterStatus} ></Poster>}
|
553
|
|
- {!conditionVisible && <Block>
|
554
|
|
- <View className="houselist">
|
555
|
|
- {this.renderBar()}
|
556
|
|
- {!houseList.length ? this.renderBlank() : this.renderHouses()}
|
557
|
|
- {this.renderBottom()}
|
558
|
|
- </View>
|
559
|
|
- {/* 分享按钮 */}
|
560
|
|
- <ActSheet show={showShareMenu}>
|
561
|
|
- <ShareButtons
|
562
|
|
- circleBtn={showCircleBtn}
|
563
|
|
- onShareFrineds={this.handleShareFrineds}
|
564
|
|
- onSharingCircleOfFriends={() => this.togglePosterStatus(true)}
|
565
|
|
- // onSharingCircleOfFriends={this.handleSharingCircleOfFriends}
|
566
|
|
- />
|
567
|
|
- </ActSheet>
|
568
|
|
- </Block>
|
|
554
|
+ {salesBatchDetail.status == "1" ?
|
|
555
|
+ <Block>
|
|
556
|
+ {!conditionVisible && <Block>
|
|
557
|
+ <View className="houselist">
|
|
558
|
+ {this.renderBar()}
|
|
559
|
+ {!houseList.length ? this.renderBlank() : this.renderHouses()}
|
|
560
|
+ {this.renderBottom()}
|
|
561
|
+ </View>
|
|
562
|
+ {/* 分享按钮 */}
|
|
563
|
+ <ActSheet show={showShareMenu}>
|
|
564
|
+ <ShareButtons
|
|
565
|
+ circleBtn={showCircleBtn}
|
|
566
|
+ onShareFrineds={this.handleShareFrineds}
|
|
567
|
+ onSharingCircleOfFriends={() => this.togglePosterStatus(true)}
|
|
568
|
+ // onSharingCircleOfFriends={this.handleSharingCircleOfFriends}
|
|
569
|
+ />
|
|
570
|
+ </ActSheet>
|
|
571
|
+ </Block>
|
|
572
|
+ }
|
|
573
|
+ </Block>
|
|
574
|
+ :
|
|
575
|
+ <View style="text-align: center;margin-top: 30vh;font-size: 28rpx;color: #999;">当前销售批次已被取消发布,请在发布后再试。</View>
|
569
|
576
|
}
|
|
577
|
+
|
570
|
578
|
</Block>
|
571
|
579
|
)
|
572
|
580
|
}
|