|
@@ -42,10 +42,12 @@ export default class raiseMoney extends Component {
|
42
|
42
|
navigationBarTitleText: '认筹确认'
|
43
|
43
|
}
|
44
|
44
|
state = {
|
45
|
|
- current: 2,
|
|
45
|
+ current: 0,
|
46
|
46
|
inputName: '',
|
47
|
47
|
raiseProfile: undefined,
|
48
|
48
|
record: {},
|
|
49
|
+ protocolCountdown: 10, // 单位 s
|
|
50
|
+ captchaCountdown: 60, // 单位 s
|
49
|
51
|
}
|
50
|
52
|
|
51
|
53
|
captchaLock = false
|
|
@@ -59,15 +61,7 @@ export default class raiseMoney extends Component {
|
59
|
61
|
raiseRecordId, // 认筹单ID, // 从认筹列表进入
|
60
|
62
|
} = this.$router.params
|
61
|
63
|
|
62
|
|
- if (houseId) {
|
63
|
|
- this.loadHouseInfo(houseId, salesBatchId)
|
64
|
|
- }
|
65
|
|
-
|
66
|
|
- if (raiseRecordId) {
|
67
|
|
- this.loadRaiseRecord(raiseRecordId)
|
68
|
|
- }
|
69
|
|
-
|
70
|
|
- if (!houseId && !raiseRecordId) {
|
|
64
|
+ if (!salesBatchId && !raiseRecordId) {
|
71
|
65
|
Taro.showToast({
|
72
|
66
|
title: '错误, 请返回上一步',
|
73
|
67
|
icon: 'none',
|
|
@@ -75,18 +69,20 @@ export default class raiseMoney extends Component {
|
75
|
69
|
return;
|
76
|
70
|
}
|
77
|
71
|
|
|
72
|
+ this.loadInfo(houseId, salesBatchId, raiseRecordId)
|
|
73
|
+
|
78
|
74
|
if (this.$router.params.type == 'pay') {
|
79
|
75
|
this.setState({ current: 3 })
|
80
|
76
|
}
|
81
|
77
|
})
|
82
|
78
|
}
|
83
|
79
|
|
84
|
|
- loadHouseInfo = (houseId, salesBatchId) => {
|
|
80
|
+ loadInfo = (houseId, salesBatchId, raiseRecordId) => {
|
85
|
81
|
const { userInfo, house } = this.props
|
86
|
82
|
const { personId, nickname, idcard, tel, phone } = userInfo.person
|
87
|
83
|
|
88
|
84
|
// 请求认筹信息
|
89
|
|
- getRaiseProfile({ salesBatchId, personId }).then(res => {
|
|
85
|
+ getRaiseProfile({ salesBatchId, raiseRecordId, personId }).then(res => {
|
90
|
86
|
this.setState({ raiseProfile: res, record: res.record || { personId, name: nickname, idcard, tel: tel || phone } })
|
91
|
87
|
|
92
|
88
|
// 请求置业顾问列表
|
|
@@ -100,10 +96,6 @@ export default class raiseMoney extends Component {
|
100
|
96
|
})
|
101
|
97
|
}
|
102
|
98
|
|
103
|
|
- loadRaiseRecord = (raiseRecordId) => {
|
104
|
|
-
|
105
|
|
- }
|
106
|
|
-
|
107
|
99
|
handleCancel = (house) => {
|
108
|
100
|
Taro.showModal({
|
109
|
101
|
title: '提示',
|
|
@@ -116,6 +108,14 @@ export default class raiseMoney extends Component {
|
116
|
108
|
})
|
117
|
109
|
}
|
118
|
110
|
|
|
111
|
+ gotoHouseSelect = (pageType) => {
|
|
112
|
+ const url = pageType == 'all' ?
|
|
113
|
+ `/onlineSelling/pages/houseCart/index` :
|
|
114
|
+ `/onlineSelling/pages/addHouse/index`
|
|
115
|
+
|
|
116
|
+ Taro.navigateTo({ url })
|
|
117
|
+ }
|
|
118
|
+
|
119
|
119
|
renderTop() {
|
120
|
120
|
const tabList = [
|
121
|
121
|
{ title: '确认房源', value: 0 },
|
|
@@ -157,8 +157,8 @@ export default class raiseMoney extends Component {
|
157
|
157
|
)
|
158
|
158
|
)
|
159
|
159
|
}
|
160
|
|
- <View className="addhouse">从<Text style="color:#BB9C79">预选记录</Text>中添加其他房源</View>
|
161
|
|
- <View className="addhouse">从<Text style="color:#F3B82E">房源列表</Text>中添加其他房源</View>
|
|
160
|
+ <View className="addhouse">从 <Text style="color:#F3B82E" onClick={this.gotoHouseSelect.bind(this, 'all')}>房源列表</Text> 中添加其他房源</View>
|
|
161
|
+ <View className="addhouse">从 <Text style="color:#BB9C79" onClick={this.gotoHouseSelect.bind(this, 'select')}>预选记录</Text> 中添加其他房源</View>
|
162
|
162
|
<Statement style="margin-top:80rpx" />
|
163
|
163
|
</ScrollView>
|
164
|
164
|
)
|
|
@@ -244,7 +244,6 @@ export default class raiseMoney extends Component {
|
244
|
244
|
}
|
245
|
245
|
|
246
|
246
|
tochooseConsultant() {
|
247
|
|
- console.log('--------------------------------------')
|
248
|
247
|
Taro.navigateTo({
|
249
|
248
|
url: '/onlineSelling/pages/chooseConsultant/index'
|
250
|
249
|
})
|
|
@@ -256,7 +255,7 @@ export default class raiseMoney extends Component {
|
256
|
255
|
}
|
257
|
256
|
|
258
|
257
|
renderProfile() {
|
259
|
|
- const { record } = this.state
|
|
258
|
+ const { record, captchaCountdown } = this.state
|
260
|
259
|
const consultant = this.getConsultant()
|
261
|
260
|
const disabled = !!record.raiseRecordId
|
262
|
261
|
|
|
@@ -292,7 +291,7 @@ export default class raiseMoney extends Component {
|
292
|
291
|
验证码
|
293
|
292
|
</View>
|
294
|
293
|
<Input className='inputCode' placeholder-style="color:#999" type='text' disabled={disabled} onInput={this.handleInput.bind(this, 'captcha')} placeholder='请填写验证码' />
|
295
|
|
- <Captcha countdown={5} require={this.prepareGetCaptcha.bind(this)} onClick={this.handleCaptcha} />
|
|
294
|
+ <Captcha countdown={captchaCountdown} require={this.prepareGetCaptcha.bind(this)} onClick={this.handleCaptcha} />
|
296
|
295
|
</View>
|
297
|
296
|
<View className="profile-flex" style="margin-top:20rpx">
|
298
|
297
|
<View className="title">我的置业顾问信息</View>
|
|
@@ -454,13 +453,13 @@ export default class raiseMoney extends Component {
|
454
|
453
|
}
|
455
|
454
|
|
456
|
455
|
renderBottomBtn() {
|
457
|
|
- const { current } = this.state
|
|
456
|
+ const { current, protocolCountdown } = this.state
|
458
|
457
|
return (
|
459
|
458
|
<View className="bottom-btn">
|
460
|
459
|
{current == 1 && <View style="font-size:24rpx;color:#999;line-height:70rpx">请仔细阅读选房协议直到结尾才能进入下一步</View>}
|
461
|
460
|
{current != 4 &&
|
462
|
461
|
<NextStep
|
463
|
|
- countdown={current == 1 ? 2 : 0}
|
|
462
|
+ countdown={current == 1 ? protocolCountdown : 0}
|
464
|
463
|
onClick={() => this.nextStep(current)}
|
465
|
464
|
text={current == 3 ? '现在缴费' : '下一步'}
|
466
|
465
|
/>
|