张延森 5 år sedan
förälder
incheckning
77bc61bffb
3 ändrade filer med 14 tillägg och 7 borttagningar
  1. 1
    1
      config/dev.js
  2. 1
    1
      config/prod.js
  3. 12
    5
      src/onlineSelling/pages/raiseMoney/index.js

+ 1
- 1
config/dev.js Visa fil

@@ -15,7 +15,7 @@ module.exports = {
15 15
     WSS_HOST: '"ws://192.168.2.52:8080"',
16 16
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
17 17
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
18
-    Version: 'V3.5.12'
18
+    Version: 'V3.5.13'
19 19
   },
20 20
   weapp: {},
21 21
   h5: {}

+ 1
- 1
config/prod.js Visa fil

@@ -11,7 +11,7 @@ module.exports = {
11 11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12 12
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
13 13
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
14
-    Version: 'V3.5.12'
14
+    Version: 'V3.5.13'
15 15
   },
16 16
   weapp: {},
17 17
   h5: {}

+ 12
- 5
src/onlineSelling/pages/raiseMoney/index.js Visa fil

@@ -598,9 +598,6 @@ export default class raiseMoney extends Component {
598 598
   }
599 599
 
600 600
   makePay = () => {
601
-    this.setState({
602
-      payClick: false
603
-    })
604 601
     const { payType, record = {} } = this.state
605 602
     if (!payType) {
606 603
       Taro.showToast({
@@ -708,6 +705,9 @@ export default class raiseMoney extends Component {
708 705
   }
709 706
 
710 707
   nextStep(current) {
708
+    const { payClick } = this.state
709
+    if (!payClick) return;
710
+
711 711
     // 缴费的下一步
712 712
     if (current > 3) {
713 713
       this.setState({
@@ -744,13 +744,20 @@ export default class raiseMoney extends Component {
744 744
 
745 745
         // 缴费
746 746
         case 3:
747
+          this.setState({
748
+            payClick: false
749
+          })
750
+
747 751
           this.makePay().then(() => {
748 752
 
749 753
             this.setState({
750 754
               payClick: true,
751 755
               current: current + 1
752 756
             })
757
+          }).catch(() => {
758
+            this.setState({ payClick: true })
753 759
           })
760
+
754 761
           return;
755 762
 
756 763
         //
@@ -771,7 +778,7 @@ export default class raiseMoney extends Component {
771 778
   }
772 779
 
773 780
   renderBottomBtn() {
774
-    const { current, protocolCountdown, payClick } = this.state
781
+    const { current, protocolCountdown } = this.state
775 782
     const { payType } = this.state
776 783
     return (
777 784
       <View className="bottom-btn">
@@ -779,7 +786,7 @@ export default class raiseMoney extends Component {
779 786
         {current != 4 &&
780 787
           <NextStep
781 788
             countdown={current == 1 ? protocolCountdown : 0}
782
-            onClick={() => payClick ? this.nextStep(current) : ''}
789
+            onClick={() => this.nextStep(current)}
783 790
             text={current == 3 && payType === 'onLine' ? '现在缴费' : '下一步'}
784 791
           />
785 792
         }