xujing 5 years ago
parent
commit
338da3843f
1 changed files with 16 additions and 14 deletions
  1. 16
    14
      src/onlineSelling/pages/raiseMoney/index.js

+ 16
- 14
src/onlineSelling/pages/raiseMoney/index.js View File

53
     preselectList: [],        // 我的预选 - 当前批次
53
     preselectList: [],        // 我的预选 - 当前批次
54
     protocolCountdown: 5,    // 单位 s
54
     protocolCountdown: 5,    // 单位 s
55
     captchaCountdown: 60,     // 单位 s
55
     captchaCountdown: 60,     // 单位 s
56
-    payType: '',              // 缴费方式
56
+    payType: 'offLine',          // 缴费方式
57
     failInfo: undefined,      // 操作失败 - 对象 { title, desc }
57
     failInfo: undefined,      // 操作失败 - 对象 { title, desc }
58
     disableCaptcha: false,    // 锁定验证码输入
58
     disableCaptcha: false,    // 锁定验证码输入
59
     payTypeList: [
59
     payTypeList: [
557
       // 最后, 校验验证码      
557
       // 最后, 校验验证码      
558
       checkCaptcha(record.tel, record.captcha).then(() => {
558
       checkCaptcha(record.tel, record.captcha).then(() => {
559
         this.setState({ disableCaptcha: true })
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
       }).catch(() => {
573
       }).catch(() => {
561
         Taro.showToast({
574
         Taro.showToast({
562
           title: '验证码不正确',
575
           title: '验证码不正确',
567
         reject()
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
 
745
 
745
   renderBottomBtn() {
746
   renderBottomBtn() {
746
     const { current, protocolCountdown } = this.state
747
     const { current, protocolCountdown } = this.state
748
+    const { payType } = this.state
747
     return (
749
     return (
748
       <View className="bottom-btn">
750
       <View className="bottom-btn">
749
         {current == 1 && <View style="font-size:24rpx;color:#999;line-height:70rpx">请仔细阅读选房协议直到结尾才能进入下一步</View>}
751
         {current == 1 && <View style="font-size:24rpx;color:#999;line-height:70rpx">请仔细阅读选房协议直到结尾才能进入下一步</View>}
751
           <NextStep
753
           <NextStep
752
             countdown={current == 1 ? protocolCountdown : 0}
754
             countdown={current == 1 ? protocolCountdown : 0}
753
             onClick={() => this.nextStep(current)}
755
             onClick={() => this.nextStep(current)}
754
-            text={current == 3 ? '现在缴费' : '下一步'}
756
+            text={current == 3 && payType === 'onLine' ? '现在缴费' : '下一步'}
755
           />
757
           />
756
         }
758
         }
757
         {current != 0 && current != 4 && <View className="up-btn" onClick={() => this.upStep(current)}>上一步</View>}
759
         {current != 0 && current != 4 && <View className="up-btn" onClick={() => this.upStep(current)}>上一步</View>}