|
@@ -6,7 +6,7 @@ import Statement from '../../components/Statement'
|
6
|
6
|
import ConsultantItem from '../../components/ConsultantItem/index'
|
7
|
7
|
import ready from '@/utils/ready'
|
8
|
8
|
import dayjs from 'dayjs'
|
9
|
|
-import { connect } from '@tarojs/redux'
|
|
9
|
+import { connect, getStore } from '@tarojs/redux'
|
10
|
10
|
import * as houseActions from '@/actions/house'
|
11
|
11
|
import NextStep from './NextStep'
|
12
|
12
|
import { fetch, apis } from '@/utils/request'
|
|
@@ -18,6 +18,7 @@ import { checkIDCard, isEmpty } from '@/utils/tools'
|
18
|
18
|
import ContactConsultant from '../../components/ContactConsultant'
|
19
|
19
|
import RadioList from './RadioList'
|
20
|
20
|
import * as noticeType from '@/constants/common.js'
|
|
21
|
+import { UPDATE_USER_INFO } from '@/constants/user'
|
21
|
22
|
|
22
|
23
|
const getRaiseProfile = ({ salesBatchId, raiseRecordId }) => {
|
23
|
24
|
const queryString = [
|
|
@@ -257,7 +258,7 @@ export default class raiseMoney extends Component {
|
257
|
258
|
return (
|
258
|
259
|
<ScrollView scrollY className="container3">
|
259
|
260
|
<View className="agent-box">
|
260
|
|
- <View className="center-title">线上选房协议</View>
|
|
261
|
+ <View className="center-title">【线上选房协议】</View>
|
261
|
262
|
<View className="rich-text">
|
262
|
263
|
<RichText nodes={raiseProfile.payProtocol || ''} />
|
263
|
264
|
</View>
|
|
@@ -433,7 +434,7 @@ export default class raiseMoney extends Component {
|
433
|
434
|
const payTypeSettings = (raiseProfile.payType || '').split(',')
|
434
|
435
|
const showTypes = payTypeList.filter(x => (payTypeSettings.indexOf(x.value) > -1))
|
435
|
436
|
const showProtocal = payType === 'onLine' ? raiseProfile.payDescriptionOnline : raiseProfile.payDescriptionOffline
|
436
|
|
- const payTip = payType === 'onLine' ? '线上缴费说明' : '线下缴费说明'
|
|
437
|
+ const payTip = payType === 'onLine' ? '【线上缴费说明】' : '【线下缴费说明】'
|
437
|
438
|
|
438
|
439
|
return (
|
439
|
440
|
<ScrollView scrollY className="container2" style="padding:0 30rpx">
|
|
@@ -571,6 +572,9 @@ export default class raiseMoney extends Component {
|
571
|
572
|
// 最后, 校验验证码
|
572
|
573
|
checkCaptcha(record.tel, record.captcha).then(() => {
|
573
|
574
|
this.setState({ disableCaptcha: true })
|
|
575
|
+ const {
|
|
576
|
+ dispatch
|
|
577
|
+ } = getStore()
|
574
|
578
|
|
575
|
579
|
saveRaiseRecord({
|
576
|
580
|
...record,
|
|
@@ -579,6 +583,12 @@ export default class raiseMoney extends Component {
|
579
|
583
|
userName: consultant.name,
|
580
|
584
|
}, raiseProfile).then((res) => {
|
581
|
585
|
this.setState({ record: res, disableCaptcha: false })
|
|
586
|
+ dispatch({
|
|
587
|
+ type: UPDATE_USER_INFO,
|
|
588
|
+ payload: {
|
|
589
|
+ name: record.name
|
|
590
|
+ }
|
|
591
|
+ })
|
582
|
592
|
resolve(res)
|
583
|
593
|
}).catch((err) => {
|
584
|
594
|
this.setState({ disableCaptcha: false, current: 4, failInfo: { title: '认筹失败', desc: err.message || err } })
|
|
@@ -666,7 +676,24 @@ export default class raiseMoney extends Component {
|
666
|
676
|
})
|
667
|
677
|
}
|
668
|
678
|
})
|
|
679
|
+ }
|
|
680
|
+
|
|
681
|
+ handleChatClick() {
|
|
682
|
+ const { userInfo: { miniApp: { tpls }, person: { personId, nickname, name } }, house: { chooseConsultant } } = this.props
|
|
683
|
+ const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_NOTICE && x.isSubscribe == true)[0] || {}).tplId
|
|
684
|
+ wx.requestSubscribeMessage({
|
|
685
|
+ tmplIds: [tplId],
|
|
686
|
+ success(res) {
|
|
687
|
+ },
|
|
688
|
+ fail(res) {
|
669
|
689
|
|
|
690
|
+ },
|
|
691
|
+ complete() {
|
|
692
|
+ Taro.navigateTo({
|
|
693
|
+ url: `/pages/im/index?sendId=${personId}&sendName=${encodeURIComponent(name || nickname)}&receiverId=${chooseConsultant.id}&receiverName=${encodeURIComponent(chooseConsultant.name || chooseConsultant.nickname || chooseConsultant.userName)}`
|
|
694
|
+ })
|
|
695
|
+ }
|
|
696
|
+ })
|
670
|
697
|
}
|
671
|
698
|
renderResult() {
|
672
|
699
|
const { raiseProfile = {}, record = {}, failInfo, payType } = this.state
|
|
@@ -684,9 +711,8 @@ export default class raiseMoney extends Component {
|
684
|
711
|
isOk &&
|
685
|
712
|
(
|
686
|
713
|
<Block>
|
687
|
|
-
|
|
714
|
+ <View className="tip" style="margin-bottom:10rpx">详情请查看认筹单</View>
|
688
|
715
|
{payType === 'onLine' && <Block>
|
689
|
|
- <View className="tip" style="margin-bottom:10rpx">详情请查看认筹单</View>
|
690
|
716
|
<View className="tip">支付结果请留意微信支付通知</View>
|
691
|
717
|
</Block>}
|
692
|
718
|
{payType === 'offLine' && <Block>
|
|
@@ -701,7 +727,7 @@ export default class raiseMoney extends Component {
|
701
|
727
|
!isOk && (<View className="tip">{(failInfo || {}).desc}</View>)
|
702
|
728
|
}
|
703
|
729
|
|
704
|
|
- <ContactConsultant buildingId={raiseProfile.buildingId} text="联系专属置业顾问" style=" position: absolute;bottom: 11vh;" />
|
|
730
|
+ <ContactConsultant buildingId={raiseProfile.buildingId} contactClick={() => this.handleChatClick()} text="联系专属置业顾问" style=" position: absolute;bottom: 11vh;" />
|
705
|
731
|
{
|
706
|
732
|
record.raiseRecordId &&
|
707
|
733
|
(<View className="look-btn" onClick={() => this.toRaiseProfile(record.raiseRecordId)}>查看认筹单</View>)
|