From 92146b2ca987538074c380f07f567ca85347dd13 Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期一, 06 一月 2025 14:17:39 +0800
Subject: [PATCH] feat: 新增月租车页面

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

diff --git a/src/components/page/IndexTest.vue b/src/components/page/IndexTest.vue
index fffb84f..b522a4e 100644
--- a/src/components/page/IndexTest.vue
+++ b/src/components/page/IndexTest.vue
@@ -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:{
@@ -132,11 +133,6 @@
               this.code2 = this.getCode2FromUrl(url)
               window.location.href = "http://hesuancj.cn/#/indexTest?code="+this.code+"&state=STATE&code2="+this.code2
             }
-            if(this.code != null && this.code != '') {
-              this.dialogVisible = true
-            }else {
-              this.dialogVisible = false
-            }
             var cs = url.split('?')[1];
             var cs_arr = cs.split('&');
             var cs={};
@@ -146,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;
@@ -164,6 +168,7 @@
         methods: {
             pay(){
                 this.payFlag = true;
+                this.payNowFlag = true;
                 if(this.status3==1){
                     this.$message({
                         message: '鎮ㄦ湁杩濈珷鏈鐞嗭紝璇峰厛澶勭悊鎴栬仈绯诲仠杞﹀満绠$悊浜哄憳',
@@ -238,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) {
@@ -284,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 // 鏀粯绛惧悕
                 },

--
Gitblit v1.9.1