<!DOCTYPE html>
<html>

<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" />
    <link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/2.4.0/weui.min.css">
    <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 href="/static/188537/css/main.css" rel="stylesheet" />
    <title>老田收酒</title>
</head>

<body>
    <div>
        <div class="title">
            <div>
                <b>老田卖茅台酒，假1赔3</b>
            </div>
            <div>
                <b>电话：18302569999</b>
            </div>
        </div>
        <div style="padding:1rem;">
            <div style="text-align:center">
                <b>3大优势</b>
            </div>
            <div style="font-size:.8rem;">
                <b>1、有真酒数据库:用3000瓶茅台真酒做87年到今年数据库，方便对比</b><br />
                <b>2、有鉴定仪器:自创普茅光学仪器，获得双专利产品认证，用来鉴定茅台酒体和防伪真假</b><br />
                <b>3、有实战经验:鉴定茅台真假1瓶15秒，卖出去的每瓶酒都把酒体图、物流码图、喷码图，3张图生成防伪二维码贴在酒瓶上</b>
            </div>
        </div>
        <div id="proContent"></div>

    </div>

    <script src="https://res.wx.qq.com/open/libs/weuijs/1.2.1/weui.min.js"></script>
    <script type="text/javascript" src="https://res2.wx.qq.com/open/js/jweixin-1.6.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
        })

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

        // var product_id = '9123'
        function getInfo(lat, lng) {
            $.ajax({
                url: '/wx/label/scan_record/',
                data: { lat: lat, lng: lng, uid: uid, compid: 188537, fwcode: label_code, contents: 1 },
                success: function (res) {
                    if (res.e === '') {
                        tj_public.hideLoading();
                        $("#labelImg").attr("src", res.img);
                        $("#cpidSpan").text(res.code);
                        if (res.bcode) {
                            $("#cpidSpan").text(res.bcode);
                        }
                        $("#queryNum").text(res.cnt);
                        if (res.tm_1st) {
                            $("#firstTime").text(res.tm_1st);
                        }
                        else {
                            var myDate = new Date();
                            $("#firstTime").text(myDate.toLocaleString());
                        }

                        var product_id = res.product_id
                        if (product_id) {
                            $("#proContent").html(decodeURIComponent(res.product_contents))
                            // $.ajax({
                            //     url: '/product/detail/',
                            //     data: {
                            //         id: product_id
                            //     },
                            //     success: function (product) {
                            //         console.log(product);
                            //         $("#proContent").html(decodeURIComponent(product.contents))
                            //     }
                            // })
                        }

                    } else {
                        alert('网络超时！')
                    }
                }, error: function () {
                    alert('网络超时！')
                }
            })
        }
    </script>
</body>

</html>