<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<!-- Apple devices fullscreen -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- Apple devices fullscreen -->
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<base target="mainFrame" />
<title>{$_SERVER['WEB_NAME']}—国内最专业的小程序管理平台</title>
<link rel="shortcut icon" href="/favicon.ico" />
</head>
<body class="gray-bg" style="background-color:#fff;">
  <div class="container" style="background-color:#fff">
<div class="row " >

   <div class="col-md-8" style="height:600px;box-sizing:border-box;padding-top: 30px;padding-left: 50px;margin:0 auto">
   <p class="cz_item">充值金额：{$money} 订单号：{$result['out_trade_no']}</p>
    <p class="cz_item">请扫描下方二维码支付</p>
    <input type="hidden" name="" value="{$result['out_trade_no']}" id="out_trade_no">
   <img alt="模式二扫码支付" src="http://paysdk.weixin.qq.com/example/qrcode.php?data=<?php echo urlencode($result['code_url']);?>" style="width:150px;height:150px;"/>
   <div id="myDiv" style='margin-left: 40px;'></div><div id="timer"style='margin-left: 70px;'>0</div>
   </div>
   </div>
  </div> 
    <script>  
     var myIntval=setInterval(function(){ 
		Refresh(); 
		},1000); 
		
		function Refresh(){
		  document.getElementById("timer").innerHTML=parseInt(document.getElementById("timer").innerHTML)+1;  
		  var order_sn=$('#out_trade_no').val();
		 $.post("payResult.html",{
			out_trade_no:order_sn},function(data){
			if(data.error==0){
			 $("#myDiv").html(data.message);
             //alert(transaction_id);  
              //延迟3000毫秒执行tz() 方法
            clearInterval(myIntval);
           
			}else{
				 $("#myDiv").html(data.message);
			}
		})
		}
    </script>
   
    </body>
</html>
