|
@@ -15,19 +15,26 @@ export default class Certification extends Component {
|
15
|
15
|
}
|
16
|
16
|
state = {
|
17
|
17
|
signDetail: {},
|
|
18
|
+ autoErr: null,
|
18
|
19
|
}
|
19
|
20
|
|
20
|
21
|
componentWillMount() {
|
21
|
22
|
ready.queue(() => {
|
22
|
|
- const { id: raiseRecordId } = this.$router.params
|
|
23
|
+ const { id: raiseRecordId, consultantInfo = {} } = this.$router.params
|
23
|
24
|
contractUser({ raiseRecordId, }).then(res => {
|
24
|
25
|
this.setState({
|
25
|
26
|
signDetail: res || {}
|
26
|
27
|
}, () => {
|
27
|
28
|
const { signDetail } = this.state
|
28
|
29
|
if (signDetail.status == 2 && signDetail.authStatus == 'autoSign') {
|
29
|
|
- contractAuto().then(res => {
|
30
|
|
- console.log(res, "自动签署合同自动签署合同自动签署合同自动签署合同自动签署合同自动签署合同")
|
|
30
|
+ contractAuto({ raiseRecordId, }).then(res => {
|
|
31
|
+ Taro.navigateTo({
|
|
32
|
+ url: `//onlineSelling/pages/raiseMoney/signResult?id=${raiseRecordId}&consultantInfo=${consultantInfo}`
|
|
33
|
+ })
|
|
34
|
+ }).catch(err => {
|
|
35
|
+ this.setState({
|
|
36
|
+ autoErr: err.message || ''
|
|
37
|
+ })
|
31
|
38
|
})
|
32
|
39
|
}
|
33
|
40
|
})
|
|
@@ -37,7 +44,9 @@ export default class Certification extends Component {
|
37
|
44
|
}
|
38
|
45
|
|
39
|
46
|
handleChatClick() {
|
40
|
|
- const { userInfo: { miniApp: { tpls }, person: { personId, nickname, name } } } = this.props
|
|
47
|
+
|
|
48
|
+ const { consultantInfo = {} } = this.$router.params
|
|
49
|
+ const { user: { userInfo: { miniApp: { tpls }, person: { personId, nickname, name } } } } = this.props
|
41
|
50
|
const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_NOTICE && x.isSubscribe == true)[0] || {}).tplId
|
42
|
51
|
wx.requestSubscribeMessage({
|
43
|
52
|
tmplIds: [tplId],
|
|
@@ -48,7 +57,7 @@ export default class Certification extends Component {
|
48
|
57
|
},
|
49
|
58
|
complete() {
|
50
|
59
|
Taro.navigateTo({
|
51
|
|
- url: `/pages/im/index?sendId=${personId}&sendName=${encodeURIComponent(name || nickname)}&receiverId=${consultant.id}&receiverName=${encodeURIComponent(consultant.name || consultant.nickname || consultant.userName)}`
|
|
60
|
+ url: `/pages/im/index?sendId=${personId}&sendName=${encodeURIComponent(name || nickname)}&receiverId=${consultantInfo.consultantPersonId}&receiverName=${encodeURIComponent(consultantInfo.name || consultantInfo.nickname || consultantInfo.userName)}`
|
52
|
61
|
})
|
53
|
62
|
}
|
54
|
63
|
})
|
|
@@ -69,7 +78,7 @@ export default class Certification extends Component {
|
69
|
78
|
|
70
|
79
|
|
71
|
80
|
render() {
|
72
|
|
- const { signDetail } = this.state
|
|
81
|
+ const { signDetail, autoErr } = this.state
|
73
|
82
|
const status = signDetail ? signDetail.status : ''
|
74
|
83
|
const showIcon = status == 2 ? require('../../assets/success2.png') : (status == 0 || status == 1) ? require('../../assets/fail2.png') : status == 2 ? require('../../assets/fail2.png') : require('../../assets/going.png')
|
75
|
84
|
|
|
@@ -84,13 +93,22 @@ export default class Certification extends Component {
|
84
|
93
|
<Image className="result-img" src={showIcon}></Image>
|
85
|
94
|
<View className="status" >实名认证<Text style={status == 3 ? 'color:#2CD7AA' : status == 2 ? 'color:#118EE9' : 'color:#F4333B'}>{showTitle}</Text></View>
|
86
|
95
|
|
87
|
|
- {status == 4 && <View className="tip" style="margin-top:10rpx">不通过原因:XXXXXX</View>}
|
|
96
|
+ {status == 4 && <View className="tip" style="margin-top:14rpx">不通过原因:XXXXXX</View>}
|
88
|
97
|
|
89
|
|
- {status == 2 && <View className="tip" style="margin-top:10rpx">正在准备合同,请不要退出···</View>}
|
|
98
|
+ {status == 2 && <Block>
|
|
99
|
+ {!autoErr && <View className="tip" style="margin-top:14rpx">正在准备合同,请不要退出···</View>}
|
|
100
|
+ {autoErr && <Block>
|
|
101
|
+ <View className="tip" style="margin-top:14rpx;color:#F4333B">自动签署失败</View>
|
|
102
|
+ <View className="tip" style="margin-top:14rpx;color:#333">原因:{autoErr}</View>
|
|
103
|
+ <View className="tip" style="margin-top:24rpx">请联系专属置业顾问解决</View>
|
|
104
|
+ <ContactConsultant contactClick={() => this.handleChatClick()} text="请联系专属置业顾问" style=" position: absolute;bottom: 9vh;" />
|
|
105
|
+ </Block>}
|
|
106
|
+ </Block>
|
|
107
|
+ }
|
90
|
108
|
|
91
|
|
- {(status == 0 || status == 1 || status == 4) && <View className="tip" style="margin-top:10rpx">请返回重新发起认证</View>}
|
|
109
|
+ {(status == 0 || status == 1 || status == 4) && <View className="tip" style="margin-top:14rpx">请返回重新发起认证</View>}
|
92
|
110
|
|
93
|
|
- {status == 3 && <View className="tip" style="margin-top:10rpx; display: flex;align-items: center;" onClick={() => this.handleBtnClick()}>实名信息需要法大大审核,请刷新状态
|
|
111
|
+ {status == 3 && <View className="tip" style="margin-top:14rpx; display: flex;align-items: center;" onClick={() => this.handleBtnClick()}>实名信息需要法大大审核,请刷新状态
|
94
|
112
|
<Image style="width:18px;height:18px;margin-left:8rpx" src={require('../../assets/refresh.png')} />
|
95
|
113
|
</View>}
|
96
|
114
|
|
|
@@ -99,10 +117,6 @@ export default class Certification extends Component {
|
99
|
117
|
{status == 3 && <View class="certification-btn" onClick={() => this.handleBtnClick()}>更新我的实名认证信息</View>}
|
100
|
118
|
</Block>
|
101
|
119
|
}
|
102
|
|
- {/*
|
103
|
|
- <ContactConsultant contactClick={() => this.handleChatClick()} text="请联系专属置业顾问" style=" position: absolute;bottom: 9vh;" />
|
104
|
|
- */}
|
105
|
|
-
|
106
|
120
|
</View>
|
107
|
121
|
)
|
108
|
122
|
}
|