xujing 5 年前
父节点
当前提交
338da3843f
共有 1 个文件被更改,包括 16 次插入14 次删除
  1. 16
    14
      src/onlineSelling/pages/raiseMoney/index.js

+ 16
- 14
src/onlineSelling/pages/raiseMoney/index.js 查看文件

@@ -53,7 +53,7 @@ export default class raiseMoney extends Component {
53 53
     preselectList: [],        // 我的预选 - 当前批次
54 54
     protocolCountdown: 5,    // 单位 s
55 55
     captchaCountdown: 60,     // 单位 s
56
-    payType: '',              // 缴费方式
56
+    payType: 'offLine',          // 缴费方式
57 57
     failInfo: undefined,      // 操作失败 - 对象 { title, desc }
58 58
     disableCaptcha: false,    // 锁定验证码输入
59 59
     payTypeList: [
@@ -557,6 +557,19 @@ export default class raiseMoney extends Component {
557 557
       // 最后, 校验验证码      
558 558
       checkCaptcha(record.tel, record.captcha).then(() => {
559 559
         this.setState({ disableCaptcha: true })
560
+
561
+        saveRaiseRecord({
562
+          ...record,
563
+          houseList,
564
+          userId: consultant.userId,
565
+          userName: consultant.name,
566
+        }, raiseProfile).then((res) => {
567
+          this.setState({ record: res, disableCaptcha: false })
568
+          resolve(res)
569
+        }).catch((err) => {
570
+          this.setState({ disableCaptcha: false, current: 4, failInfo: { title: '认筹失败', desc: err.message || err } })
571
+        })
572
+
560 573
       }).catch(() => {
561 574
         Taro.showToast({
562 575
           title: '验证码不正确',
@@ -567,18 +580,6 @@ export default class raiseMoney extends Component {
567 580
         reject()
568 581
       })
569 582
 
570
-      saveRaiseRecord({
571
-        ...record,
572
-        houseList,
573
-        userId: consultant.userId,
574
-        userName: consultant.name,
575
-      }, raiseProfile).then((res) => {
576
-        this.setState({ record: res, disableCaptcha: false })
577
-        resolve(res)
578
-      }).catch((err) => {
579
-        this.setState({ disableCaptcha: false, current: 4, failInfo: { title: '认筹失败', desc: err.message || err } })
580
-      })
581
-
582 583
     })
583 584
   }
584 585
 
@@ -744,6 +745,7 @@ export default class raiseMoney extends Component {
744 745
 
745 746
   renderBottomBtn() {
746 747
     const { current, protocolCountdown } = this.state
748
+    const { payType } = this.state
747 749
     return (
748 750
       <View className="bottom-btn">
749 751
         {current == 1 && <View style="font-size:24rpx;color:#999;line-height:70rpx">请仔细阅读选房协议直到结尾才能进入下一步</View>}
@@ -751,7 +753,7 @@ export default class raiseMoney extends Component {
751 753
           <NextStep
752 754
             countdown={current == 1 ? protocolCountdown : 0}
753 755
             onClick={() => this.nextStep(current)}
754
-            text={current == 3 ? '现在缴费' : '下一步'}
756
+            text={current == 3 && payType === 'onLine' ? '现在缴费' : '下一步'}
755 757
           />
756 758
         }
757 759
         {current != 0 && current != 4 && <View className="up-btn" onClick={() => this.upStep(current)}>上一步</View>}