zaijin 3 lat temu
rodzic
commit
a132974179
3 zmienionych plików z 47 dodań i 48 usunięć
  1. 4 4
      common/config.js
  2. 2 1
      pages/index/index.vue
  3. 41 43
      static/html/wxPayCallback.html

+ 4 - 4
common/config.js

@@ -1,9 +1,9 @@
 const config = {
-	wxAppid:'wxbe90cc7c5233dd84',// 测试wxAppid 
-	// wxAppid: 'wx45c3cf2b632f5fd5', // 正式wxAppid
+	// wxAppid:'wxbe90cc7c5233dd84',// 测试wxAppid 
+	wxAppid: 'wx45c3cf2b632f5fd5', // 正式wxAppid
 	
-	baseUrl:'https://wx.hw.hongweisoft.com/parking',// 64服务器
-	// baseUrl: 'https://parking.pdzhtc.com', //正式接口访问地址
+	// baseUrl:'https://wx.hw.hongweisoft.com/parking',// 64服务器
+	baseUrl: 'https://parking.pdzhtc.com', //正式接口访问地址
 }
 export {
 	config

+ 2 - 1
pages/index/index.vue

@@ -458,7 +458,8 @@ export default {
             }
             // 无感和手动
             const enableFeepay = []
-            res.data.orderList.forEach(item => {
+						const orderList = res?.data?.orderList ?? []
+            orderList.forEach(item => {
               if (item.enableFeepay) {
                 enableFeepay.push(item.enableFeepay)
               } else {

+ 41 - 43
static/html/wxPayCallback.html

@@ -1,4 +1,3 @@
-<!--周世豪,20210716-->
 <html>
 <head>
     <meta charset="utf-8">
@@ -9,53 +8,51 @@
     <script type="text/javascript" src="https://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
     <script type="text/javascript" charset="UTF-8" src="https://wx.gtimg.com/pay_h5/goldplan/js/jgoldplan-1.0.0.js"></script>
     <style type="text/css">
-			body {
-				margin: 0;
-				padding: 0;
-				width: 100%;
-				height: 600px;
-			}
-			.container {
-				height: 100%;
-				padding: 50px 0;
-				text-align: center;
-				background: linear-gradient(138deg, #7EBAB8 0%, #48999A 100%);
-				box-shadow: 0px 2px 4px 0px #0B7C7D;
-			}
-			.text-img {
-				width: calc(100% - 40px);
-				margin: 0 auto;
-			}
-			.car-img {
-				width: 100%;
-				margin-top: 39px;
-			}
-			.button {
-				display: inline-block;
-				width: calc(100% - 84px);
-				height: 6vh;
-				line-height: 6vh;
-				text-decoration: none;
-				margin-top: 4vh;
-				outline: none;
-				border: none;
-				background: #FFFFFF;
-				box-shadow: 0px 7px 13px 0px rgba(0, 105, 106, 0.26);
-				border-radius: 10px;
-				font-size: 1.1em;
-				font-weight: 500;
-				color: #1D8587;
-				font-family: 'PingFangSC-Medium, PingFang SC';
-			}
+    	body {
+    		margin: 0;
+    		padding: 0;
+    		width: 100%;
+    		height: 600px;
+    	}
+    	.container {
+    		height: 100%;
+    		padding: 50px 0;
+    		text-align: center;
+    		background: linear-gradient(138deg, #7EBAB8 0%, #48999A 100%);
+    		box-shadow: 0px 2px 4px 0px #0B7C7D;
+    	}
+    	.text-img {
+    		margin: 0 auto;
+    	}
+    	.car-img {
+    		margin-top: 39px;
+    	}
+    	.button {
+    		display: inline-block;
+    		width: calc(100% - 84px);
+    		height: 6vh;
+    		line-height: 6vh;
+    		text-decoration: none;
+    		margin-top: 4vh;
+    		outline: none;
+    		border: none;
+    		background: #FFFFFF;
+    		box-shadow: 0px 7px 13px 0px rgba(0, 105, 106, 0.26);
+    		border-radius: 10px;
+    		font-size: 1.1em;
+    		font-weight: 500;
+    		color: #1D8587;
+    		font-family: 'PingFangSC-Medium, PingFang SC';
+    	}
     </style>
 </head>
 <body>
     <div class="container">
 		<div class="text-img">
-			<img src="https://h5.pdzhtc.com/static/img/text-html-bg.png" alt="" width="375" height="150"/>
+			<img src="https://h5.pdzhtc.com/static/img/text-html-bg.png" alt="" width="290" height="100"/>
 		</div>
 		<div class="car-img">
-			<img src="https://h5.pdzhtc.com/static/img/car-html-bg.png" alt="" width="375" height="270"/>
+			<img src="https://h5.pdzhtc.com/static/img/car-html-bg.png" alt="" width="300" height="170"/>
 		</div>
 		<a href="javascript:goToBgzchina()" class="button">回到普定智慧停车</a>
 	</div>
@@ -86,12 +83,13 @@
                                height:960};//高度可选(参考说明文档)
         var postData = JSON.stringify(mchData);
         parent.postMessage(postData,'https://payapp.weixin.qq.com');
-    
+        
+        const jumpUrl = localStorage.getItem('jumpUrl')
         //测试跳转到其他页面【非必需】
         function goToBgzchina() {
             var mchData = {
                 action: 'jumpOut',
-                jumpOutUrl: 'https://h5.pdzhtc.com' //要跳转到的页面。注意:不支持跳转到小程序
+                jumpOutUrl: jumpUrl || 'https://h5.pdzhtc.com' //要跳转到的页面。注意:不支持跳转到小程序
             };
             var postData = JSON.stringify(mchData);
             parent.postMessage(postData, 'https://payapp.weixin.qq.com');