|
@@ -10,13 +10,10 @@
|
|
|
<link rel="stylesheet" type="text/css" href="css/mui.min.css" />
|
|
|
<link rel="stylesheet" type="text/css" href="css/iconfont.css" />
|
|
|
<link rel="stylesheet" type="text/css" href="css/main.css" />
|
|
|
- <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
|
|
|
- <script>
|
|
|
- //屏蔽分享
|
|
|
- document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
|
|
|
- WeixinJSBridge.call('hideOptionMenu');
|
|
|
- });
|
|
|
- </script>
|
|
|
+ <script type="text/javascript">
|
|
|
+ // 屏蔽分享
|
|
|
+ window.hiddenAllWechatMenu = true;
|
|
|
+ </script>
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
@@ -337,6 +334,10 @@
|
|
|
$.ajax(base_path+'/wechat/cart/orderPay', { // 提交订单,准备支付
|
|
|
data: dataArgs,
|
|
|
dataType: 'json',
|
|
|
+ xhrFields: {
|
|
|
+ withCredentials: true
|
|
|
+ },
|
|
|
+ crossDomain: true,
|
|
|
type: 'POST',
|
|
|
xhrFields: {
|
|
|
withCredentials: true
|
|
@@ -361,6 +362,10 @@
|
|
|
$.ajax(base_path+'/wechat/order/checkOrderPaySuccess', { // 校验订单状态
|
|
|
data: orderIds,
|
|
|
dataType: 'json',
|
|
|
+ xhrFields: {
|
|
|
+ withCredentials: true
|
|
|
+ },
|
|
|
+ crossDomain: true,
|
|
|
type: 'post',
|
|
|
xhrFields: {
|
|
|
withCredentials: true
|
|
@@ -371,7 +376,8 @@
|
|
|
if(dt.status) { // 支付成功
|
|
|
window.location.href = "pay-win.html?orderId=" + orderIds.orderId + "&dates=" + new Date().getTime();
|
|
|
} else {
|
|
|
- setTimeout(checkOrderStatus(orderIds), 1000);
|
|
|
+ mui.toast("支付失败,请稍后重试!");
|
|
|
+ //setTimeout(checkOrderStatus(orderIds), 1000);
|
|
|
}
|
|
|
},
|
|
|
error: function(xhr, type, errorThrown) {
|
|
@@ -383,7 +389,7 @@
|
|
|
});
|
|
|
} else {
|
|
|
isPay = true;
|
|
|
- //mui.alert("对不起,支付失败!请稍后重试!" + dt.data.orderId + "支付失败!");
|
|
|
+ mui.alert("对不起,支付失败!请稍后重试!" + dt.data.orderId + "支付失败!");
|
|
|
//window.location.href = "order-details.html?orderId=" + dt.data.orderId; // 前往订单详情
|
|
|
}
|
|
|
});
|