From 1e106aedda95d0df26ce9909da2761cde2105d32 Mon Sep 17 00:00:00 2001
From: 1012414140@qq.com <1012414140@qq.com>
Date: 星期五, 16 十月 2026 09:42:17 +0800
Subject: [PATCH] feat: 获取 “去缴费接口” 的响应失败

---
 src/components/page/Index2.vue |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/src/components/page/Index2.vue b/src/components/page/Index2.vue
index 95653ca..a32bb49 100644
--- a/src/components/page/Index2.vue
+++ b/src/components/page/Index2.vue
@@ -5,7 +5,7 @@
             <!--<div class="text"><h1>宄板嘲鐭垮尯缁煎悎琛屾斂鎵ф硶灞�</h1></div>-->
             <!--<div class="right"></div>-->
         <!--</div>-->
-        <div class="weizhang-main-box">
+        <div class="weizhang-main-box" v-loading="loading">
             <div class="weizhang-main-top">
                 <img class="logoPhone" src="../../assets/images/logoImg.png" alt="">
                 <span class="weizhang">鍋滆溅鏀惰垂</span>
@@ -33,9 +33,12 @@
                             {{this.statisticData.code}}
                             <!--<el-input v-model="statisticData.code" readonly></el-input>-->
                         </el-form-item>
+                      <template>
                         <el-form-item class="weizhang-footer-box" style="display: flex;justify-content: center;margin-top: 5.498vh" label-width="0" v-show="showFlag">
-                            <el-button class="jiaofei-btn" type="primary" @click="pay()" :loading="payFlag">鍘荤即璐�</el-button>
+                          <el-button class="jiaofei-btn" type="primary" @click="pay()" :loading="payFlag">鍘荤即璐�</el-button>
                         </el-form-item>
+                      </template>
+
                     </el-form>
                     <el-form
                         class="carSearch"
@@ -77,7 +80,8 @@
                 status3:0,
                 carNo:"",
                 oldCarNo:"",
-                code2:""
+                code2:"",
+                loading: false,
             }
         },
         created(){
@@ -90,8 +94,11 @@
             }
             //this.outParkId = cs.code;
             this.code2 = cs.code;
+
+            this.loading = true;
             this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/outpark/findByBarrierCode', {code:cs.code}, res => {
-                this.statisticData = res.data;
+              this.loading = false
+              this.statisticData = res.data;
                 this.outParkId = this.statisticData.id;
                 this.status3 = this.statisticData.status3;
                 this.oldCarNo = this.statisticData.carNo;
@@ -114,11 +121,19 @@
                         type: 'error',
                         duration:3000,
                     });
+                    this.payFlag = false;
                     return;
                 }
                 this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/api/park', {id:this.outParkId}, res => {
-                    window.location.href = res.msg
                     this.showFlag = false;
+                    if(res.msg){
+                        window.location.href = res.msg;
+                    }else{
+                        this.$message.error('鑾峰彇缂磋垂閾炬帴澶辫触, 璇烽噸鏂版壂鐮佹敮浠�');
+                    }
+                }, () => {
+                    this.payFlag = false;
+                    this.$message.error('璇锋眰缂磋垂閾炬帴澶辫触锛岃閲嶆柊鎵爜鏀粯锛�');
                 })
             },
             noCarOut(){

--
Gitblit v1.9.1