张延森 5 anos atrás
pai
commit
81a1f74280
1 arquivos alterados com 7 adições e 10 exclusões
  1. 7
    10
      src/onlineSelling/pages/raiseMoney/index.js

+ 7
- 10
src/onlineSelling/pages/raiseMoney/index.js Ver arquivo

@@ -60,10 +60,10 @@ export default class raiseMoney extends Component {
60 60
       { label: '线上缴费', value: 'onLine' },
61 61
       { label: '线下缴费', value: 'offLine' },
62 62
     ],
63
-    payClick: true,
64 63
   }
65 64
 
66 65
   captchaLock = false
66
+  paying = false
67 67
 
68 68
   // 此页面不支持分享,以及二维码
69 69
   componentWillMount() {
@@ -705,8 +705,7 @@ export default class raiseMoney extends Component {
705 705
   }
706 706
 
707 707
   nextStep(current) {
708
-    const { payClick } = this.state
709
-    if (!payClick) return;
708
+    if (this.paying) return;
710 709
 
711 710
     // 缴费的下一步
712 711
     if (current > 3) {
@@ -744,18 +743,16 @@ export default class raiseMoney extends Component {
744 743
 
745 744
         // 缴费
746 745
         case 3:
747
-          this.setState({
748
-            payClick: false
749
-          })
746
+          this.paying = true
750 747
 
751 748
           this.makePay().then(() => {
752
-
753 749
             this.setState({
754
-              payClick: true,
755 750
               current: current + 1
756 751
             })
757
-          }).catch(() => {
758
-            this.setState({ payClick: true })
752
+
753
+            this.paying = false
754
+          }).catch(() => {            
755
+            this.paying = false
759 756
           })
760 757
 
761 758
           return;