<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta name="viewport"
        content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <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" />
    <link href="/static/css/32364/main.css?v=1" rel="stylesheet" />
    <title>云南宝龄富锦生物科技有限公司</title>
    <script>
        var oHtml = document.documentElement;
        function getSize() {
            var screenWidth = oHtml.clientWidth;
            console.log(screenWidth);
            if (screenWidth > 640) screenWidth = 640;
            oHtml.style.fontSize = screenWidth / 20 + 'px';
        }
        getSize();
        window.onresize = function () {
            getSize();
        };


    </script>
</head>

<body data-weui-theme="dark">


    <div class="page tabbar js_show" style="height: 100%;">
        <div class="page__bd" style="height: 100%;">
            <div class="weui-tab">
                <div class="weui-tab__panel">
                    <div class="container_zw container" id="container_zw">
                        <div class="banner" style="display: none;">
                            <img src="" id="productImg">
                        </div>
                        <hr>
                        <div class="tips_msg" id="a-msg">
                            <div class="info">
                                <div class="label">
                                    <img id="labelImg" src="" style="width:75%" />
                                </div>
                                <div class="label-tips">
                                    <div id="warn_swm">
                                        <p> 1、请用手触摸实物标签上的结构三维码，是否有明显凹感！ </p>
                                        <p> 2、请认真核对实物标签上的三维码、序号是否与上面采集图信息一致！ </p>
                                        <p> 3、以上两点都相符则为真品，否则谨防假冒！ </p>
                                    </div>
                                    <div class="main-hr"> </div>
                                </div>
                                <div class="label-info">
                                    <ul class="infos">
                                        <li><span class="info-title">首查时间: </span><span class="info-intro"
                                                id="firstTime"></span></li>
                                        <li><span class="info-title">查询次数: </span><span class="info-intro"
                                                id="queryNum"></span></li>
                                        <li style="display: none;"><span class="info-title">产品名称: </span><span class="info-intro"
                                                id="product_name"></span></li>
                                        <li style="display: none;"><span class="info-title">批次号: </span><span class="info-intro"
                                                id="pici"></span></li>
                                        <li style="display: none;"><span class="info-title">规格: </span><span class="info-intro"
                                                id="guige"></span></li>

                                    </ul>
                                </div>
                                <div class="ai-tips" id="authorBox">
                                    <p>恭喜您验证通过！您所查询的产品是云南宝龄富锦生物科技有限公司<b class="zp">正牌产品标识</b>！请放心使用！</p>
                                </div>
                                <div style=" margin-top: .75rem; text-align: center; ">
                                    <div class="aibtn  animated fadeIn" id="ai">AI匹配验证</div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="container_qy container" id="qyjs">

                        <img class="companyimg" src="/static/images/32364/0001.jpg" />
                        <img class="companyimg" src="/static/images/32364/0002.jpg" />
                        <img class="companyimg" src="/static/images/32364/0003.jpg" />
                        <img class="companyimg" src="/static/images/32364/0004.jpg" />
                        <img class="companyimg" src="/static/images/32364/0005.jpg" />
                        <img class="companyimg" src="/static/images/32364/0006.jpg" />
                        <img class="companyimg" src="/static/images/32364/0007.jpg" />
                        <img class="companyimg" src="/static/images/32364/0008.jpg" />
                        <img class="companyimg" src="/static/images/32364/0009.jpg" />
                        <img class="companyimg" src="/static/images/32364/0010.jpg" />
                        <img class="companyimg" src="/static/images/32364/0011.jpg" />
                    </div>
                    <div class="container_cp container" id="cpjs">
                        <img style="width:100%;" src="/static/images/32364/chanpin.jpg" />
                    </div>

                </div>
                <div class="weui-tabbar ">
                    <div id="zw" class="weui-tabbar__item eye">
                        <div class="weui-tabbar__icon">
                            <img class="img-click" id="zw-check" src="/static/images/32364/FW.png" />
                        </div>
                        <p class="weui-tabbar__label">防伪查询</p>
                    </div>
                    <div id="qy" class="weui-tabbar__item bar_border ">
                        <div class="weui-tabbar__icon">
                            <img class="img-click" id="qy-check" src="/static/images/32364/QY.png" />
                        </div>
                        <p class="weui-tabbar__label">企业介绍</p>
                    </div>
                    <div id="cp" class="weui-tabbar__item bar_border">
                        <div class="weui-tabbar__icon">
                            <img class="img-click" id="cp-check" src="/static/images/32364/CP.png" />
                        </div>
                        <p class="weui-tabbar__label">产品展示</p>
                    </div>
                    <div id="gw" class="weui-tabbar__item">
                        <div class="weui-tabbar__icon">
                            <img class="img-click" src="/static/images/32364/GW.png" />
                        </div>
                        <p class="weui-tabbar__label">企业官网</p>
                    </div>
                </div>
            </div>
        </div>

    </div>
    <script src="/static/js/jquery-2.1.0.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/public/public.js"></script>
    <script src="/static/js/ainew.js"></script>
    <script>
        tj_public.showLoading();
        tj_public.wxInit({
            wx_officail_account_id: 6,
            url: window.location.href
        })

        var code = "{{label_code}}";
        if (code.startsWith("90")) {
            $("#ai").hide();
        }

        let isAccess = tj_public.getQueryString('access');
        if (isAccess === '1') {
            access();
        }

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

        function access() {
            $("#authorBox").fadeIn();
            $("#ai").hide();
        }

        function getInfo(lat, lng) {
            $.ajax({
                url: '/wx/label/scan_record/',
                data: { lat: lat, lng: lng, uid: '{{consumer_id}}', compid: 32364, fwcode: '{{label_code}}' },
                success: function (res) {
                    if (res.e === '') {
                        tj_public.hideLoading();
                        $("#labelImg").attr("src", res.img); 
                        $("#queryNum").text(res.cnt);
                        $("#firstTime").text(res.tm_1st);
                        // $("#agent_name").text(res.agent_name);

                        if(res.product_photo){ 
                            $("#productImg").attr("src", "/media/"+res.product_photo);
                            $(".banner").show();
                        }
                        if(res.product_name){ 
                            $("#product_name").text(res.product_name);
                            $("#product_name").parent().show();
                        }
                        if(res.voucher_no){
                            $("#pici").text(res.voucher_no);
                            $("#pici").parent().show();
                        }
                        if(res.product_remark){
                            $("#guige").text(res.product_remark);
                            $("#guige").parent().show();
                        }
                    } else {
                        alert('网络超时！')
                    }
                }, error: function () {
                    alert('网络超时！')
                }
            })
        }

        // $('#ai').on('click', function () {
        //     window.location.href = 'https://tjfnew.china315net.com/tjswm/ai/route/route.ashx?compid=32364&cpid={{label_code}}';
        // });

        $('.weui-tabbar__item').on('click', function () {
            $(this).addClass('choosed').siblings('.choosed').removeClass('choosed');
            $('.container').hide();
        });
        $('#zw').on('click', function () {
            $(".container_zw").fadeIn()
        });
        $('#qy').on('click', function () {
            $(".container_qy").show()
        });
        $('#cp').on('click', function () {
            $(".container_cp").show()
        });

        $('#gw').on('click', function () {
            //window.location.href = 'http://ynblfj.com/'
        });

    </script>
</body>

</html>