<!VDNDOC "PageBase":"nvo_alipay_trade","IniEvent":"go","NotValidLogin":true>
<!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>
		* {
			margin: 0;
			padding: 0;
		}
		body {
			background-color: #333;
		}
		
		button {
			font-size: 28px !important;
			display: block;
			width: 60%;
			height: 52px;
			margin-bottom: 10px;
			padding: 15px 0
		}
		
		img {
			max-width: 100%;
			height: auto;
		}
		
		.content{
			color: white;
			padding: 20px;
		}
	</style>
</head>
<body>
	<div>
		<p>
			<img src="images/live_weixin.png" id="img_brower" style="display:none;" alt="浏览器打开" />
			<div id="d_content" class="content">
			</div>
		</p>
	</div>
		<div class="mui-button-row">
		<button type="button" id="b_pay_ok" class="mui-btn mui-btn-green mui-hidden">支付成功</button>
	</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>
	//===========================微信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() {
				//隐藏所有非基础按钮接口
				wx.hideAllNonBaseMenuItem();
				//显示浏览器打开
				wx.showMenuItems({menuList: ["menuItem:openWithSafari"]});
		})
	//禁止返回
	vdn.setBack("main.html");
	$(document).ready(function() {
		SetTime(5000);
	});
	//获取支付结果
	var iError=0;
	function GetResult() {
		$("#b_pay_ok").removeClass("mui-hidden");//show button	
		vdn.get({
				method: 'nvo_pay_result.getresult',
				params: '<!--INCLUDE:BillID;JS-->',
			}, function(data) {
				if(data.Result != "N") {
					$(location).prop('href', "pay_result.html?id="+"<!--INCLUDE:BillID;JS-->");
				} else {
					
				}
			},
			function(err) {
				mui.toast(err.Message + "(" + err.Code.toString() + ")");
				iError ++;
			});
			SetTime(2000);
	}
	
	function SetTime(n){
		setTimeout(function() {
			GetResult();
		}, n);
	}
	
	$(document).on("tap","#b_pay_ok",function(){
		$(location).prop('href', "pay_result.html?id="+"<!--INCLUDE:BillID;JS-->");
	})
</script>

</html>