Эх сурвалжийг харах

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

john 2 жил өмнө
parent
commit
d45314cfbf

+ 6 - 0
src/api/request.js

@@ -174,6 +174,12 @@ export const createAxiosByinterceptors = (config) => {
       return response.data;
     },
     function (error) {
+      console.log('error', error);
+      // 断网
+      if (error.code === 'ERR_NETWORK') {
+        uni.showToast({ title: '网络连接失败,请重试', duration: 3000, icon: 'fail' });
+        return Promise.reject(error.code);
+      }
       // 对响应错误做点什么
       console.log('error-response:', error.response);
       console.log('error-config:', error.config);

+ 16 - 3
src/pages/parkingFee/mixins/parkingFeeDetail.js

@@ -83,6 +83,9 @@ export default {
       appId: state => state.appId,
       source: state => state.source,
     }),
+    isNoLogin() {
+      return JSON.stringify(this.member) === '{}' || !this.member
+    },
     // 支付按钮状态
     payBtnDisabled() {
       // 当存在待支付金额 或者 用户登陆
@@ -122,11 +125,12 @@ export default {
   methods: {
     // 前往支付
     async toPay() {
+      if (this.btnLoading) return
       this.btnLoading = true
       setTimeout(() => {
         if ( this.btnLoading && !this.isPay ) {
           const toast1 = Toast({
-            message: '操作异常,返回上一页后请重试!',
+            message: '网络连接失败,请重试',
             duration: 3000,
             onClose: () => {
               this.$router.replace({
@@ -137,7 +141,7 @@ export default {
           });
           this.btnLoading = false
         }
-      }, 7000)
+      }, 10000)
       const { parkingRecord, discountInfo = {}, parkingRule = {}} = this.orderDetail;
       const { coupons, points, memberGrade = [], paperCoupons = [], consume = [] } = discountInfo
       const { hourPrice } = parkingRule
@@ -244,6 +248,14 @@ export default {
       } catch (err) {
         this.btnLoading = false
         this.isPay = false
+        if(err ==='ERR_NETWORK') {
+          setTimeout(() => {
+            this.$router.replace({
+              // path: 'parkingFeeSuccess?carno=' + this.parkInfo.carno,
+              path: 'home',
+            });  
+          }, 2900)
+        }
         console.log(err);
       }
     },
@@ -268,7 +280,8 @@ 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 = `${window.profileApi}/payment/v1/services/session/${session}/transactions`;
+      let path = `https://11111111111/payment/v1/services/session/${session}/transactions`;
       this.$request({
         url: path,
         data: params,