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 | 31 +++++++++++++++++--------------
1 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/src/components/page/IndexTest.vue b/src/components/page/IndexTest.vue
index 638b40d..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" @click="pay()">绔� 鍗� 鏀� 浠�</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:{
@@ -120,10 +121,10 @@
//鏀粯瀹�
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;
@@ -131,12 +132,6 @@
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
- }
- console.log('this.code====',this.code)
- if(this.code != null && this.code != '') {
- this.dialogVisible = true
- }else {
- this.dialogVisible = false
}
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 // 鏀粯绛惧悕
},
--
Gitblit v1.9.1