<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0" />
    <title>李伟烟酒</title>
    <link href="/static/css/public/reset.css" rel="stylesheet" />
    <link href="/static/css/public/public.css" rel="stylesheet" />
    <script src="/static/js/public/reset.js"></script>
    <link rel="stylesheet" href="/static/cgsm/css/main.css" />
</head>
<body style="background:url(/static/cgsm/img/bj.png);background-size:100%100%">
    <div>
        <img src="/static/cgsm/img/b1.jpg" style="width:100%;display:block;line-height:0" />
    </div>
    <div style="text-align:center;margin-top:2.5rem">
        <img src="/static/cgsm/img/1.png" style="width:50%"/>
        <p style="color:white">长按二维码识别添加好友</p>
    </div>

    <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
    <script src="/static/js/jquery-2.1.0.min.js"></script>
    <script src="/static/js/public/public.js"></script>
    <script>

        tj_public.showLoading();
        // tj_public.hideLoading();
        var uid = tj_public.getCookie('TJWX_consumer_id');
        var label_code = tj_public.getCookie('label_code');
        tj_public.wxInit({
            wx_officail_account_id: 6,
            url: window.location.href
        })

        $(function () {
            wx.ready(function () {
                if (uid) {
                    tj_public.getAddress(function (lat, lng) {
                        getInfo(lat, lng)
                    })
                }
            })
            wx.error(function (res) {
                if (uid) {
                    getInfo(0, 0);
                }
            });

            function getInfo(lat, lng) {
                $.ajax({
                    url: '/wx/label/scan_record/',
                    data: { lat: lat, lng: lng, uid: uid, compid: 174834, fwcode: label_code, contents: 1 },
                    success: function (res) {
                        if (res.e === '') {
                            tj_public.hideLoading();

                        } else {
                            // alert('网络超时！')
                        }
                    }, error: function () {
                        // alert('网络超时！')
                    }
                })
            }
        });

    </script>
</body>
</html>