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

Merge branch 'release-2.4.0' into John/release-2.4.0/SCRM-3298

john.hong 2 жил өмнө
parent
commit
1909d5ca11

+ 1 - 1
src/api/request.js

@@ -175,7 +175,7 @@ export const createAxiosByinterceptors = (config) => {
       }
       // 错误信息提示
       const { code, langMessage, message } = error.response.data;
-      const codeList = ['INTERNAL_SERVER_ERROR', 'VALIDATION_FAILED', 'CAR_NOT_FOUND', 'CAR_HAS_PLATE', "NOT_FOUND", "LOCAL_PARK_ERROR"]; // 默认处理的错误code
+      const codeList = ['INTERNAL_SERVER_ERROR', 'VALIDATION_FAILED', 'CAR_NOT_FOUND', 'CAR_HAS_PLATE', "NOT_FOUND", "LOCAL_PARK_ERROR", "LOCK_OCCUPIED"]; // 默认处理的错误code
       if (codeList.indexOf(code) > -1) {
         uni.showToast({ title: langMessage || message, duration: 3000, icon: 'fail' });
       }

+ 1 - 1
src/pages/parkingFee/components/base/parkingReceipt/parkingReceipt.vue

@@ -265,7 +265,7 @@
                 class="choice_card_index choice_card_index3"
                 v-if="tabIndex == 2 && item.status === 'FAILED'"
                 style="padding-bottom: 20px;justify-content: flex-end;font-size: 20px;"
-                @click.stop="showFailureReason(item)"
+                @click.stop="showFailureReason(item.errorMessage)"
               >
               <van-icon name="info"  size="12" color="#d7d7d7" style="margin-right: 10px;"/>
                 <!-- <van-icon name="info-o" > -->

+ 5 - 15
src/pages/parkingFee/mixins/parkingReceipt/parkingApplication.js

@@ -216,14 +216,11 @@ export default {
           });
           const headerInfo = list[currentIndex] || {};
           self.headerInfo = headerInfo;
-        } else {
-          Toast({
-            message: '服务器开小差了呢,请您稍后再试',
-          });
         }
-      } catch {
+      } catch(err) {
+        console.log(111, err)
         uni.showToast({
-          title: '服务器开小差了呢,请您稍后再试',
+          title: err.langMessage,
           icon: 'none',
         });
       }
@@ -427,16 +424,9 @@ export default {
       this.$router.replace({
         path: 'parkingReceipt',
       });
-    } else {
-      Toast({
-        message: '服务器开小差了呢,请您稍后再试',
-      });
     }
-  } catch {
-    uni.showToast({
-      title: '服务器开小差了呢,请您稍后再试',
-      icon: 'none',
-    });
+  } catch (err) {
+    console.log(111, err);
   }
 //   uni.request({
 //   // url: self.$baseURL + 'api/1.0/invoice/addMyInvoiceInfo',

+ 3 - 4
src/pages/parkingFee/mixins/parkingReceipt/parkingReceipt.js

@@ -409,13 +409,12 @@ export default {
        this.totalNum = totalNum;
        } */
     },
-    showFailureReason(item) {
-      console.log(458, item);
+    showFailureReason(reson) {
       this.$dialog({
         title: '开票失败原因',
-        message: '',
+        message: reson,
         confirmButtonText: '关闭',
-        confirmButtonColor: '#064c8a',
+        confirmButtonColor: '#644A79',
       }).then(() => {
         // on confirm
         console.log('confirm');