Browse Source

支付成功查看订单没有订单id

qihanjiao 7 years ago
parent
commit
8bea0a5392
1 changed files with 7 additions and 7 deletions
  1. 7 7
      aiberle/clearing.html

+ 7 - 7
aiberle/clearing.html

@@ -298,7 +298,7 @@ var yhq_id='';			mui.ready(function() {
 							location.href = 'pay-win.html?orderId=' + dt.data.orderId + "&dates=" + new Date().getTime();
 							return;
 						};
-
+						var orderId=dt.data.orderId;
 						if(dt.status) {
 							var str = dt.data.info;
 							var obj = JSON.parse("{" + str + "}");
@@ -307,7 +307,7 @@ var yhq_id='';			mui.ready(function() {
 								if(res.err_msg == 'get_brand_wcpay_request:ok') {
 									$.ajax(base_path + '/wechat/order/checkOrderPaySuccess?dates=' + new Date().getTime(), {
 												data: {
-													"orderId": dt.data.orderId
+													"orderId": orderId
 												},
 												dataType: 'json',
 												xhrFields: {
@@ -321,9 +321,9 @@ var yhq_id='';			mui.ready(function() {
 														location.href = dataobj.redirectURL;
 													} else {
 														if(dataobj.status == true) { // 支付成功
-															location.href = "pay-win.html?orderId=" + dataobj.data + "&dates=" + new Date().getTime();
+															location.href = "pay-win.html?orderId=" + orderId + "&dates=" + new Date().getTime();
 														} else {
-															location.href = "order-details.html?orderId=" + dataobj.data + "&dates=" + new Date().getTime(); // 前往订单详情
+															location.href = "order-details.html?orderId=" + orderId + "&dates=" + new Date().getTime(); // 前往订单详情
 														}
 													}
 												},
@@ -349,15 +349,15 @@ var yhq_id='';			mui.ready(function() {
 //									});
 								} else {
 									isPay = true;
-									mui.alert("对不起,支付失败!请稍后重试!" + dt.data.orderId + "支付失败!", function() {
-										location.href = "order-details.html?orderId=" + dt.data.orderId + "&dates=" + new Date().getTime(); // 前往订单详情
+									mui.alert("对不起,支付失败!请稍后重试!" + orderId + "支付失败!", function() {
+										location.href = "order-details.html?orderId=" + orderId + "&dates=" + new Date().getTime(); // 前往订单详情
 									});
 								}
 							});
 						} else {
 							isPay = true;
 							mui.alert(dt.message);
-							location.href = "order-details.html?orderId=" + dt.data.orderId + "&dates=" + new Date().getTime(); // 前往订单详情
+							location.href = "order-details.html?orderId=" + orderId + "&dates=" + new Date().getTime(); // 前往订单详情
 						}
 					},
 					error: function(xhr, type, errorThrown) {