{% load staticfiles %}

<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="format-detection" content="telephone=no,email=no,address=no">
        <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
        <title>授权登录二维码</title>

        <link href="//res.wx.qq.com/open/libs/weui/0.4.3/weui.min.css" rel="stylesheet" type="text/css" />

        <style>
            input:required:invalid {
                color: #E64340;
            }
            input:required:valid {
                color: rgb(0, 0, 0);
            }
            .hidden {
                display: none;
            }
            .qr {
                position: fixed;
                left: 50%;
                top: 50%;
                margin-left: -100px;
                margin-top: -100px;
                padding: 5px 5px 0 5px;
                border: 1px solid #000;
                border-radius: 5px;
            }
        </style>
    </head>
    <body>
        <div class="container" >
            <img id="qr_logo" class="hidden" src="{% static 'kodo/img/paiai_96_96.png' %}">
            <div id="qr" class="qr"></div>
        </div>

        <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
        <script src="//cdnjs.cloudflare.com/ajax/libs/lrsjng.jquery-qrcode/0.14.0/jquery-qrcode.min.js"></script>
        <script>
            $("#qr").empty().qrcode({
                render: 'canvas',
                mode: 0,
                text: '{{ qr }}'
            });
        </script>
        <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
        <script type="text/javascript" src="{% static 'kodo/js/jswe-0.0.4.js' %}"></script>
        <script>
            V.initWxData({
                imgUrl: "http://pai.ai/static/kodo/img/paiai_96_96.png",
                link: 'http://pai.ai/w/o?r=http%3A%2F%2Fpai.ai%2Fp%2Floginqr',
                desc: "授权登录",
                title: "授权登录",
                timeLine: ""
            }, true);
            V.hideOptionMenu();
        </script>
    </body>
</html>