<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="viewport"
          content="width=device-width, initial-scale=1">
    <title>QQ钱包扫码支付</title>
    <link rel="stylesheet" href="/static/uhome/xsinmages/css/amazeui.min.css">
    <link rel="stylesheet" href="/static/uhome/xsinmages/css/wx.css">
</head>
<body>
    <header class="wepay">
        <h1 align="center"> <img src="/static/uhome/images/qqpaylogo.png"></h1>
    </header>
    <div class="am-g am-g-fixed am-margin-vertical wx-box">
        <div class="am-u-md-8 am-u-sm-12 am-u-sm-centered am-margin-vertical am-text-center">
            </div>

            <div class="am-u-md-8 am-u-sm-12 am-u-sm-centered am-margin-vertical am-text-center">支付完成前，请勿关闭此页面！</div>
            <div class="am-u-md-8 am-u-sm-12 am-u-sm-centered am-margin-vertical am-text-center">
                <div class="wx-guide"><img src="/static/uhome/images/wxwebpay_guide.png" alt=""></div>
            </div>
            <div class="am-u-md-8 am-u-sm-12 am-u-sm-centered am-margin-vertical am-text-center wx-code" id="qrcode">
			<div id="code"></div>
			</div>

            <div class="am-u-md-8 am-u-sm-12 am-u-sm-centered am-margin-vertical am-text-center">
                <img src="/static/uhome/images/wxsm.png" alt="请使用微信扫描
二维码以完成支付">
            </div>
            <div class="am-u-md-8 am-u-sm-12 am-u-sm-centered am-margin-vertical am-text-center">
                <hr>
                <p class="am-text-xxxl">￥ <?php echo $amount;?>元</p>
				<div class="am-center" style="color:red"><a target= _blank href="<?php echo $gourl;?>">付款成功后可点击【领取商品】</a></div>
                <hr>
               
                <div class="am-cf">
                    <div class="am-fl">支付订单号：<?php echo $orderno;?></div><div class="am-fr">订单时间：<?php echo date('Y-m-d H:i:s',$ctime)?></div>
                </div>
                <hr>             
                <div class="am-cf">
                    <div class="am-fl">请在订单提交后5分钟内完成支付！！</div> 
                </div>
                <hr>
                
            </div>
        </div>
    <script src="<?php echo S('STATIC');?>/static/home/js/jquery.min.js"></script>
		<script src="/static/public/js/jquery.qrcode.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			jQuery(document).ready(function($){ 
			    try{
			        jQuery('#code').qrcode("<?php echo $code;?>");
			        var cl=setInterval(function () {
			        	jQuery.ajax({
				        	url:"/pay/wxpay_check",
				            data:{
				            	orderno:"<?php echo $orderno;?>",
				            	model:"<?php echo $model;?>"
				            },
				            dataType: "json",
				            type: "post",
				            timeout: 10000,
				            success: function(data) {
				            	if (data.status==1 || data.status==2) {
				            		location.href='<?php echo $gourl;?>';
				            	}
				            },
				            error: function() {
				                mui.toast("网络连接超时");
				            }
				        });
		        	},3000);
			    }catch(e){}
			});
		</script>
</body>
</html>
 
