From 105128d7780861f699a3261fdad68804fe5b7c80 Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期四, 20 二月 2025 11:43:35 +0800
Subject: [PATCH] feat: 出场增加缴费状态查询

---
 src/components/page/IndexTest.vue |   41 ++++++++++++++++++++++-------------------
 1 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/src/components/page/IndexTest.vue b/src/components/page/IndexTest.vue
index 89bd7f6..b522a4e 100644
--- a/src/components/page/IndexTest.vue
+++ b/src/components/page/IndexTest.vue
@@ -59,14 +59,14 @@
           <div class="dialog-main-box">
             <div class="dialog-main-line">
               <h1>鍚堣璐圭敤</h1>
-              <h1>17.00鍏�</h1>
+              <h1>{{this.statisticData.price}}鍏�</h1>
             </div>
             <div class="dialog-main-line">
               <h1>鍋滆溅鏃堕暱</h1>
-              <h1>3灏忔椂2鍒嗛挓</h1>
+              <h1>{{this.statisticData.timeStr}}</h1>
             </div>
             <div class="dialog-main-line-middle">
-              <h1>17.00<font>鍏�</font></h1>
+              <h1>{{this.statisticData.price}}<font>鍏�</font></h1>
             </div>
             <div class="wx-img-box">
               <div class="wx-img-l">
@@ -79,7 +79,7 @@
             </div>
           </div>
           <span slot="footer" class="dialog-footer">
-            <el-button type="primary">绔� 鍗� 鏀� 浠�</el-button>
+            <el-button type="primary" @click="pay()" :loading="payNowFlag">绔� 鍗� 鏀� 浠�</el-button>
           </span>
         </el-dialog>
       </div>
@@ -95,6 +95,7 @@
             return {
                 dialogVisible:false,
                 payFlag:false,
+                payNowFlag:false,
                 outParkId:"",
                 type:null,
                 statisticData:{
@@ -109,7 +110,6 @@
             }
         },
         created(){
-
           let ua = window.navigator.userAgent.toLowerCase();
           //鍒ゆ柇鏄笉鏄井淇�
           if (ua.match(/MicroMessenger/i) == "micromessenger") {
@@ -121,22 +121,17 @@
             //鏀粯瀹�
             this.type = 1
           }
-          // if(this.type == null){
-          //   this.$message.error("璇风敤寰俊鎴栨敮浠樺疂鎵弿浜岀淮鐮�")
-          //   return;
-          // }
-
+          if(this.type == null){
+            this.$message.error("璇风敤寰俊鎴栨敮浠樺疂鎵弿浜岀淮鐮�")
+            return;
+          }
 
             var url = window.location.href;
             var count = url.split('?').length-1;
             if(count >1){
               this.code = this.getCodeFromUrl(url)
               this.code2 = this.getCode2FromUrl(url)
-              //window.location.href = "http://hesuancj.cn/#/indexTest?code="+this.code+"&state=STATE&code2="+this.code2
-              window.location.href = " http://192.168.0.113:8083/#/indexTest?code="+this.code+"&state=STATE&code2="+this.code2
-            }
-            if(this.code != null || this.code != '') {
-              this.dialogVisible = true
+              window.location.href = "http://hesuancj.cn/#/indexTest?code="+this.code+"&state=STATE&code2="+this.code2
             }
             var cs = url.split('?')[1];
             var cs_arr = cs.split('&');
@@ -147,7 +142,15 @@
             //this.outParkId = cs.code;
           this.code2 = cs.code2;
           this.code = cs.code;
-          this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/outpark/findByBarrierCode', {code2:cs.code2}, res => {
+          if(this.code2 == null || this.code2 == ''){
+            window.location.href = "http://hesuancj.cn/#/indexTest?code2="+this.code
+          }
+          if(this.code != null && this.code != '') {
+            this.dialogVisible = true
+          }else {
+            this.dialogVisible = false
+          }
+          this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/outpark/findByBarrierCode2', {code2:cs.code2}, res => {
             this.statisticData = res.data;
             this.outParkId = this.statisticData.id;
             this.status3 = this.statisticData.status3;
@@ -165,6 +168,7 @@
         methods: {
             pay(){
                 this.payFlag = true;
+                this.payNowFlag = true;
                 if(this.status3==1){
                     this.$message({
                         message: '鎮ㄦ湁杩濈珷鏈鐞嗭紝璇峰厛澶勭悊鎴栬仈绯诲仠杞﹀満绠$悊浜哄憳',
@@ -239,7 +243,6 @@
                   this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/api/getOpenId', {id:this.outParkId,code:this.code}, res => {
                     if(res.code === 0){
                       var param = res.data;
-                      alert(param)
                       // 鐐瑰嚮鏀粯鏃跺�欒皟鐢�
                       if (typeof WeixinJSBridge === 'undefined') {
                         if (document.addEventListener) {
@@ -285,7 +288,7 @@
                   appId: params.appId, // 鍏紬鍙峰悕绉帮紝鐢卞晢鎴蜂紶鍏�
                   timeStamp: params.timeStamp, // 鏀粯绛惧悕鏃堕棿鎴筹紝娉ㄦ剰寰俊jssdk涓殑鎵�鏈変娇鐢╰imestamp瀛楁鍧囦负灏忓啓銆備絾鏈�鏂扮増鐨勬敮浠樺悗鍙扮敓鎴愮鍚嶄娇鐢ㄧ殑timeStamp瀛楁鍚嶉渶澶у啓鍏朵腑鐨凷瀛楃
                   nonceStr: params.nonceStr, // 鏀粯绛惧悕闅忔満涓诧紝涓嶉暱浜� 32 浣�
-                  package: params.prepay_id, // 缁熶竴鏀粯鎺ュ彛杩斿洖鐨刾repay_id鍙傛暟鍊硷紝鎻愪氦鏍煎紡濡傦細prepay_id=\*\*\*锛�
+                  package: params.package, // 缁熶竴鏀粯鎺ュ彛杩斿洖鐨刾repay_id鍙傛暟鍊硷紝鎻愪氦鏍煎紡濡傦細prepay_id=\*\*\*锛�
                   signType: params.signType, // 绛惧悕鏂瑰紡锛岄粯璁や负'SHA1'锛屼娇鐢ㄦ柊鐗堟敮浠橀渶浼犲叆'MD5'
                   paySign: params.paySign // 鏀粯绛惧悕
                 },
@@ -304,7 +307,7 @@
             this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/outpark/getById', {id: this.outParkId}, res => {
               if (res.code == 0) {
                 let outpark = res.data
-                if(outPark.status == 1){
+                if(outpark.status == 1){
                   window.location.href = "http://hesuancj.cn/#/indexOk?code2="+this.code2
                 }else {
                   window.location.href = "http://hesuancj.cn/#/indexFail?code2="+this.code2

--
Gitblit v1.9.1