#include("layout.html")
#@layout("微信扫一扫付款")

#define script()
<script src="#(CAPTH)/static/components/jquery/jquery.min.js"></script>
<script>
    var invoke = true;
    var interval = setInterval(function () {
        if (invoke){
            $.get("#(CPATH)/pay/query?trx=#(payment.trx_no)", function (result) {
                if (result && result.state == 'ok') {
                    invoke = false;
                    clearInterval(interval);
                    location.href = "#(CPATH)/pay/success/#(payment.trx_no)"
                }
            });
        }
    }, 1000);
</script>
#end

#define content()
<div class="pay-header">
    请使用微信扫码支付
</div>

<div class="row pay-content">
    <div class="col-lg-6 pay-content-info">
        <div class="pay-content-title">
            微信扫一扫付款
        </div>
        <div class="pay-content-money">
            ￥ #number(payment.pay_amount,'0.00') 元
        </div>
        <div class="pay-content-qrcode">
            <img src="#(qrcode_base64str ??)"/>
        </div>
    </div>
    <div class="col-lg-6 pay-content-img">
        <img src="#(CAPTH)/static/commons/img/pay-wechat.png"/>
    </div>

</div>
#end
