<?php

use xh\library\url;


?>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="renderer" content="webkit">
    <title>支付宝</title>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no,email=no">
    <meta id="WV.Meta.Share.Disabled" value="true">
    <meta name="data-bizType" content="pay">
    <meta name="data-aspm" content="a283">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">

    <script src="https://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
     <link rel="stylesheet" type="text/css" href="/static/css/h5cashier.css" media="all">
</head>
<body>
<body data-aspm="b9416">
<div class="J-msg-mask am-msg-mask" style="display:none"></div>
<div class="J-msg-box am-msg-box" style="display:none">
    <div class="am-msg-box-content">
        <p class="J-msg-text"></p>
        <button class="J-msg-cancel am-button am-button-blue" type="button">知道了</button>
    </div>
</div>
<div class="J-loading am-loading fn-hide" style="display: none"><div class="am-loading-text">加载中...</div></div>


<header class="am-header">
    <h1>
        <span class="title-main" data-title="支付宝收银台">支付宝收银台</span>
    </h1>

</header>

<noscript><h1 style="color:red">您的浏览器不支持JavaScript，请更换浏览器或开启JavaScript设置!</h1></noscript>
<!-- FD:mobileclientgw:mobileclientgw/home/v5/h5PayRoute.vm:START -->
<style>

    body {
        font-weight: 500;
        font-family: PingFangSC-Regular, "Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
    }

    .am-header {
        display: none;
    }

    .alipay-logo {
        display: none;
    }

    .result {
        margin-top: 40px;
        width: 100%;
    }

    .result-logo {
        width: 70px;
        height: 98px;
        margin: auto;
        background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIwAAADFCAMAAACxSeqoAAAAMFBMVEVMaXE2RUs8PDw8PDw8PDwMpNs8PDys4/kJpeAAqu4+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MO+HNjBIQB1f5Ndf+vFF+oKrbWFGWLaEtSNwTBGMbMj/BMbhI/zKnl1LDWC2MhAw6l7kn27DtaRkwrgVg0KYigRWOKYrDK9rcaRndXbuDuMf2oIZ/V3lMFjXqmIkcKlKYZKE1yNgJNFzNieJsK4LYSRXWB6mkqkOKXr5MH7AWMAgod07YZQtK03eAEZ2NKZR8gwj+JSXwLi9VD5pBULOwpCxFEbKSNLyiVa0wqSzt4FBg9p1DAQYitNPYdgenxSGbRjEqQEMWSBGgtxI2TYweDovZj9lGNlb6txLt7YoSk4ADcziGsNwnLjuWOJHVppZKUgEQ3H6WdHb9oNit2nBKOYnGN6ZPid/EeYhGgGLAYMLrkkC85Ff4TwLBpsc3xAGNG6XBTAUp5btQPl0kgUz4JjXCoZpdDBhoPaNUjyx9IABDVjeACOIMEk9vaU4EIY/slsgJwfC7L7TEJyJPOEcBqMoIikKAJRwDoJBqadcQaYQzmGryafmxL1kCQPqETD8ulIc5vQvPtAx+ZUFo19aTdtd27+8XfJwEj0+O220YID+JRR1S8B/cir5ldxTAMPHXVt6NzwmJCTRMQvG+accbtZcfXnGO5DsSJ1/wri7ZGit83sbp06d6iBHxVXpAMUX/dr+lM1JepuX505G7Pd4mAUGMmH4rcWzxWKgW1vZmHV2khqY8fH6xZO51ws5jkHv1RoYXTf1js3RyCzHPPp4HQxfF5hLrFmOwRwjxlXB/GJz5BoHB+5GSRUDy2B4sN8wZzgGbv3+4atgsFpgzq/m0mTPcYxb/6Yr5TBOVZ1PHvkeDAq7efLHA2KiMphVmlyVv0Mdrdg9x8Cta7CKYfi4o2QOrpGcKLk1jctzRkRoNbA50NlFxn8LtaEExjBnwfAEkNTB2OZsmGfv0r/CAq2DYXNaBIMSjfnxQe+SXBg2VwKDW2CI3a0FMI7MZcOgeGIhMIzLhmFzFswfhGgoIOnCZSQAAAAASUVORK5CYII=);
        background-repeat: no-repeat;
        background-size: contain;
    }

    .result-title {
        margin: 40px 0 14px;
        text-align: center;
        font-size: 21px;
        color: #00a0e8;
        line-height: 25px;
    }

    .result-tips {
        max-width: 370px;
        margin: 0 auto 10px;
        padding: 0 15px;
        font-size: 15px;
        color: #a5a5a5;
        line-height: 18px;
        text-align: left;
        word-break: break-all;
        word-wrap: break-word;
    }

    .result-botton {
        margin: 0 15px 20px;
    }

    .result-botton a {
        display: block;
        margin: auto;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        max-width: 384px;
        height: 44px;
        line-height: 44px;
        text-align: center;
    }

    .result-botton a.am-button-white {
        color: #ffffff;
        background-color: #00aaee;
        border: 1px solid #00aaee;
    }
   .result-botton a.am-button-blue {
        color: #00aaee;
        background-color: #ffffff;
        border: 1px solid #00aaee;
    }
    .result-botton .am-button[disabled=disabled] {
        color: #e6e6e6;
        background: #f8f8f8;
        border: 1px solid #dedede;
    }

    .loading {
        display: none;
    }
</style>
<div class="loading"></div>
<div class="am-content">
    <input type="hidden" name="params" value="{&quot;server_param&quot;:&quot;emlkPTc5O25kcHQ9YWMyNDtjYz15&quot;}">
    <div class="result">
        <div class="result-logo"></div>
        <div class="result-title"></div>
        <!--<div class="result-botton"><a id="openAlipay" onclick="order()" class="J-h5pay am-button am-button-white" >使用支付宝APP付款</a></div>-->
        				    
        				   <div class="result-botton"> <div id='okpay' class='J-h5pay am-button am-button-blue '>启动支付宝</div></div>

        
        
        <div class="result-title" style="display: none"><br></div>
    </div>
</div>
<script type="text/javascript">
    var t1;
    var payUrl;
    var params = getUrlVars();
    var u = navigator.userAgent;
    var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
    var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端


    function getUrlVars() {
        var vars = [], hash;
        var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
        for (var i = 0; i < hashes.length; i++) {
            hash = hashes[i].split('=');
            vars.push(hash[0]);
            vars[hash[0]] = hash[1];
        }
        return vars;
    }
 

    var url  = "<?php echo $h5url;?>";
    
    
 
    
    
	var updateQrImg = 0;
 



    
  
   setInterval(function () {
        $.get("<?php echo url::s('gateway/pay/automaticAlipayQuery', "id={$id}");?>",function (response) {
        	
        	
        	    okpay.onclick = function() {
    	
    			window.open(response.data.payurl);
    					
        	    	
        	    }
        	
        	
            
            	if(response.code == 100 && updateQrImg == 0){
            		
                	var url3 = encodeURIComponent(response.data.payurl);
                	window.location.href='alipays://platformapi/startapp?appId=60000029&showLoading=YES&url='+url3;
                	updateQrImg = 1;
                	
                    
                }
                
                
            
            
                if(response.code == 200){
                	
                    location.href = "<?php echo $success_url;?>";
                }
            	if(response.code == -2){
            		
                        location.href = "/weibo/cashier_msg.php?msg=订单已过期";
                        
                  }
        }, "json");
    }, 888);
    
    

    
</script>
<script>
    ap.allowPullDownRefresh(false);
</script>
</body>
</html>
