From 8613999daac6a42bef5694f43c78d0988251137e Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期二, 24 二月 2026 10:21:35 +0800
Subject: [PATCH] feat: 更新缴费bug
---
src/main.js | 2
src/store/state.js | 48 ++++++++++++------------
src/components/page/IndexXTYH.vue | 42 +++++++++------------
3 files changed, 43 insertions(+), 49 deletions(-)
diff --git a/src/components/page/IndexXTYH.vue b/src/components/page/IndexXTYH.vue
index 97fb194..d8ed2f5 100644
--- a/src/components/page/IndexXTYH.vue
+++ b/src/components/page/IndexXTYH.vue
@@ -228,6 +228,8 @@
}
},
created(){
+ //39鏈嶅姟鍣ㄧ敤鐨勬槸code2瀛楁锛�183鏈嶅姟鍣ㄧ敤鐨勬槸code瀛楁锛岃繖鏍峰氨鍙互杈惧埌183璁块棶鐨勬椂鍊欓噸鏂拌烦杞埌39鏈嶅姟鍣ㄩ〉闈�
+
this.$message = Message; // 鎸傝浇鍏ㄥ眬Message锛岄伩鍏嶉噸澶嶅紩鍏�
this.code = ''
this.code2 = ''
@@ -254,36 +256,28 @@
return;
}
- var url = decodeURIComponent(window.location.href);
- const getUrlParams=(url) => {
- const params = {};
- const queryIndex = url.indexOf('?');
- if (queryIndex === -1) return params;
- const query = url.slice(queryIndex + 1);
- query.split('&').forEach(item => {
- const [key, val] = item.split('=');
- if (key) params[key] = val || '';
- });
- return params;
- }
-
- const params = getUrlParams(url);
- this.code = params.code || '';
- this.code2 = params.code2 || '';
-
- // 浼樺寲璺宠浆閫昏緫锛堥伩鍏嶉噸澶嶈烦杞級
- if (Object.keys(params).length > 2 && params.code && params.code2) {
- // 浠呭綋鍙傛暟瀹屾暣鏃惰烦杞紙閬垮厤鏃犻檺寰幆锛�
- window.location.href = `http://hesuancj.cn/#/index2?code=${encodeURIComponent(params.code)}&state=STATE&code2=${encodeURIComponent(params.code2)}`;
+ var url = window.location.href;
+ url = decodeURIComponent(url)
+ var count = url.split('?').length-1;
+ if(count >1){ //鑾峰彇鐢ㄦ埛淇℃伅鍚庤烦鍥炴潵鏈〉闈�
+ let data = this.getCodeFromUrl(url)
+ window.location.href = `http://hesuancj.cn/#/index2?code=${encodeURIComponent(data.code)}&state=STATE&code2=${encodeURIComponent(data.code2)}`
return;
}
-
+ var cs = url.split('?')[1];
+ var cs_arr = cs.split('&');
+ var cs={};
+ for(var i=0;i<cs_arr.length;i++){
+ cs[cs_arr[i].split('=')[0]] = cs_arr[i].split('=')[1]
+ }
+ this.code2 = cs.code2;
+ this.code = cs.code;
//鍒濆鍖栬烦杞� 39 鏈嶅姟鍣�
if(this.code2 == null || this.code2 == ''){
- window.location.href = `http://hesuancj.cn/#/index2?code2=${params.code || ''}`;
- //window.location.href = "http://60.0.121.40:8889/#/IndexXTYH39?code2="+cs.code //娴嬭瘯鐢ㄧ殑
+ window.location.href = "http://hesuancj.cn/#/index2?code2="+cs.code //姝e紡
return;
}
+
if(this.code != null && this.code != '') {
this.dialogVisible = true //绔嬪嵆鏀粯寮规
}else {
diff --git a/src/main.js b/src/main.js
index 9b58c5f..7f2e619 100644
--- a/src/main.js
+++ b/src/main.js
@@ -77,7 +77,7 @@
Vue.prototype.$systemconfig = {
// 鏈嶅姟绔矾寰�
basePath: 'http://183.196.93.178:8089',
- // basePath:'http://192.168.0.40:8089'
+ // basePath:'http://127.0.0.1:8089'
}
Vue.prototype.$byutil = byUtils
Vue.prototype.$stringUtil = StringUtil
diff --git a/src/store/state.js b/src/store/state.js
index 7632504..cb27202 100644
--- a/src/store/state.js
+++ b/src/store/state.js
@@ -61,18 +61,18 @@
parentId: 2,
indexUrl: "barrierOpenLog"
},
- {
- icon: 'el-icon-document',
- name: '鏈堢エ杞﹁鍒欑鐞�',
- parentId: 2,
- indexUrl: "whiteListRule"
- },
- {
- icon: 'el-icon-document',
- name: '缂磋垂鏃ュ織绠$悊',
- parentId: 2,
- indexUrl: "paymentLog"
- },
+ // {
+ // icon: 'el-icon-document',
+ // name: '鏈堢エ杞﹁鍒欑鐞�',
+ // parentId: 2,
+ // indexUrl: "whiteListRule"
+ // },
+ // {
+ // icon: 'el-icon-document',
+ // name: '缂磋垂鏃ュ織绠$悊',
+ // parentId: 2,
+ // indexUrl: "paymentLog"
+ // },
{
icon: 'el-icon-document',
name: '鐧藉悕鍗曠鐞�',
@@ -183,18 +183,18 @@
parentId: 2,
indexUrl: "enterParkCar"
},
- {
- icon: 'el-icon-document',
- name: '鏈堢エ杞﹁鍒欑鐞�',
- parentId: 2,
- indexUrl: "whiteListRule"
- },
- {
- icon: 'el-icon-document',
- name: '缂磋垂鏃ュ織绠$悊',
- parentId: 2,
- indexUrl: "paymentLog"
- },
+ // {
+ // icon: 'el-icon-document',
+ // name: '鏈堢エ杞﹁鍒欑鐞�',
+ // parentId: 2,
+ // indexUrl: "whiteListRule"
+ // },
+ // {
+ // icon: 'el-icon-document',
+ // name: '缂磋垂鏃ュ織绠$悊',
+ // parentId: 2,
+ // indexUrl: "paymentLog"
+ // },
{
icon: 'el-icon-document',
name: '鎵嬪姩鎶潌璁板綍',
--
Gitblit v1.9.1