Procházet zdrojové kódy

fix(SCRM-3985): CRM临停付款,微信商户号内查询到用户有重复付款记录,但是在临停订单明细及前海停车系统只有一条记录

john před 2 roky
rodič
revize
685492a2c3
1 změnil soubory, kde provedl 15 přidání a 5 odebrání
  1. 15 5
      src/pages/parkingFee/mixins/parkingFeeDetail.js

+ 15 - 5
src/pages/parkingFee/mixins/parkingFeeDetail.js

@@ -246,8 +246,6 @@ export default {
         }
         this.kerryPayment(res.sessionId);
       } catch (err) {
-        this.btnLoading = false
-        this.isPay = false
         if(err ==='ERR_NETWORK') {
           setTimeout(() => {
             this.$router.replace({
@@ -255,6 +253,9 @@ export default {
               path: 'home',
             });  
           }, 2900)
+        } else {
+          this.btnLoading = false
+          this.isPay = false
         }
         console.log(err);
       }
@@ -280,8 +281,7 @@ export default {
       // console.log(1854, params);
       this.$md(params);
       // let path = `/profileApi/payment/v1/services/session/${session}/transactions`;
-      // let path = `${window.profileApi}/payment/v1/services/session/${session}/transactions`;
-      let path = `https://11111111111/payment/v1/services/session/${session}/transactions`;
+      let path = `${window.profileApi}/payment/v1/services/session/${session}/transactions`;
       this.$request({
         url: path,
         data: params,
@@ -348,7 +348,17 @@ export default {
           }
         })
         .catch((err) => {
-          console.log(1854, err);
+          if(err.code === "ERR_NETWORK") {
+            this.btnLoading = true;
+            uni.showToast({ title: '网络连接失败,请重试', duration: 3000, icon: 'fail' });
+            setTimeout(() => {
+              this.$router.replace({
+                // path: 'parkingFeeSuccess?carno=' + this.parkInfo.carno,
+                path: 'home',
+              });
+            }, 2900)
+            return
+          }
           this.reCreateParkOrder();
         });
     },