<!VDNDOC "PageBase":"nvo_pay_confirm","IniEvent":"PageIni">
<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>确认支付</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<!--标准mui.css-->
		<link rel="stylesheet" href="css/mui.min.css">
		<style>
			.mui-bar {
				height: 55px;
				top: 0px;
			}
			
			.mui-btn {
				padding: 10px;
			}
			
			.mui-radio {
				height: 100px !important;
				padding-top: 17px;
			}
			
			.mui-radio input[type=radio] {
				padding-top: 33px !important;
			}
		</style>
	</head>

	<body>
		<div id="dcontent" class="mui-content">
			<div class="mui-content-padded">
				<div id="d_content" class="content">
				</div>
				<div class="mui-card">
					<form class="mui-input-group">
						<div class="mui-input-row mui-radio mui-left">
							<label for="r_wxpay"><img src="images/wxpay.jpg" align="middle"></label>
							<input id="r_wxpay" name="payType" type="radio" value="wxpay" checked>
						</div>
						<div class="mui-input-row mui-radio mui-left">
							<label for="r_alipay"><img src="images/alipay.jpg" align="middle"></label>
							<input id="r_alipay" name="payType" type="radio" value="alipay">
						</div>
						<div class="mui-input-row mui-radio mui-left">
							<label for="r_wxpay_qr"><img src="images/wxpay_qr.jpg" align="middle"></label>
							<input id="r_wxpay_qr" name="payType" type="radio" value="wxpay_qr">
						</div>
						<div name="dv_alipay_qr" class="mui-input-row mui-radio mui-left">
							<label for="r_alipay_qr"><img src="images/alipay_qr.jpg" align="middle"></label>
							<input id="r_alipay_qr" name="payType" type="radio" value="alipay_qr">
						</div>

					</form>
				</div>

				<div class="mui-button-row">
					<button type="button" id="b_Pay" class="mui-btn mui-btn-block mui-btn-primary">确认支付</button>
				</div>
			</div>
		</div>
	</body>
	<script src="js/jweixin-1.2.0.js"></script>
	<script src="js/mui.min.js"></script>
	<script type="text/javascript" src="js/jquery-2.2.3.min.js"></script>
	<script type="text/javascript" src="js/vdn.js"></script>
	<script>
		//防止返回
		vdn.setBack("main.html");
		//===========================微信SDK初始化==================================
		var config_ok = true;
		<!--INCLUDE:wx_config;JS-->
		wx.error(function(err) {
			config_ok = false;
			alert("wx config error:" + err.errMsg);
		});
		wx.ready(function() {

		});

		$(document).on("tap", "#b_Pay", function() {
			switch($('input:radio[name="payType"]:checked').val()) {
				case "wxpay":
					wxPay();
					break;
				case "alipay":
					aliPay();
					break;
				case "wxpay_qr":
					wxQRPay();
					break;
				case "alipay_qr":
					aliQRPay();
					break;
			}

		});
		//===========================微信支付=======================================
		function wxPay() {
			wx.chooseWXPay({
				<!--INCLUDE:wx_pay;JS-->,
				success: function(res) {
					// 支付成功进行跳转
					$(location).prop('href', "<!--INCLUDE:wx_pay_url;JS-->");
				},
				fail: function(err) {
					alert(err.errMsg);
				}
			});
		};
		
		function wxQRPay() {
			$(location).prop('href', "<!--INCLUDE:wx_qrpay_url;JS-->");
		};
		//===========================支付宝支付=======================================
		function aliPay() {
			$(location).prop('href', "<!--INCLUDE:alipay_pay_url;JS-->");
		};

		function aliQRPay() {
			$(location).prop('href', "<!--INCLUDE:alipay_qrpay_url;JS-->");
		};
	</script>

</html>