<!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" />
    <script src="/static/js/public/reset.js"></script>
    <link href="/static/css/public/reset.css" rel="stylesheet" />
    <link href="/static/css/public/public.css" rel="stylesheet" />
    <link href="/static/css/32479/main.css" rel="stylesheet" />
    <title>天之骄子</title>
</head>

<body>
    <div class="container">
        <div class="top">
            <div class="top-img">
                <img style="width:100%" src="/static/images/32479/LOGO-tzjz.png" />
            </div>
            <div class="top-img">
                <img style="width: 63%;margin-left: 10%; " src="/static/images/32479/LOGO-zd.png" />
            </div>
            <div class="top-img">
                <img style="width:50%" src="/static/images/32479/LOGO-jry.png" />
            </div>
        </div>
        <div class="tips_msg" id="a-msg">

            <!--<img onclick="close_tck()" class="img_close" src="img/close.png" />-->
            <div class="info">
                <div class="label">
                    <img id="labelImg" src="" style="width:80%" />
                </div>
                <div class="label-tips">
                    <div>
                        <p id="warn_swm">请用手触摸实物标签上的结构三维码，是否有明显凹感！并认真核对是否与上图信息一致，相符则为真品，否则谨防假冒！ </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="cpidSpan"></span></li>
                        <li><span class="info-title">产品名称:</span><span class="info-intro"> 锦如颜、天之骄子、执道系列产品</span></li>
                        <li><span class="info-title">全球运营机构:</span><span class="info-intro">天之骄子(香港)生物科技公司</span></li>
                        <li><span class="info-title">查询次数:</span><span class="info-intro" id="queryNum"></span></li>
                        <!--<li><span class="info-title">首查时间:</span><span class="info-intro" id="firstTime"></span></li>-->

                    </ul>

                    <p class="p-tips">您可以点击下方按钮进行AI身份验证！</p>
                </div>
                <div class="ai-tips" id="authorBox">
                    <p>恭喜您验证通过！您所查询的是天之骄子(香港)生物科技公司的<b class="zp">正牌产品标识!</b></p>
                </div>
                <div>
                    <div class="aibtn  animated fadeIn" id="ai">AI验证</div>
                </div>
            </div>
        </div>

        <div class="gzh">
            <div class="gzhbtn  animated fadeIn" id="ai">关注公众号</div>
        </div>
    </div>

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

        tj_public.wxInit({
            wx_officail_account_id: 6,
            url: window.location.href
        })
        tj_public.showLoading();

        wx.ready(function () {
            tj_public.getAddress(function (lat, lng) {
                getInfo(lat, lng)
            })
        })
        wx.error(function (res) {
            getInfo(0, 0)
        });
        function getInfo(lat, lng) {
            $.ajax({
                url: '/wx/label/scan_record/',
                data: { lat: lat, lng: lng, uid: '{{consumer_id}}', compid: '{{company_id}}', fwcode: '{{label_code}}' },
                success: function (res) {
                    if (res.e === '') {
                        tj_public.hideLoading();
                        $("#cpidSpan").text(res.bcode);
                        $("#labelImg").attr("src", res.img);
                        $("#queryNum").text(res.cnt);

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


        var package = tj_public.getCookie('package');
        if (package === '3') {
            $('.p-tips').hide();
            $("#ai").hide();
            $("#warn_swm").text("请认真核对实物标签上文字特征是否与上图信息一致，并用手触摸是否有物理凹凸感，非印刷墨迹堆叠，相符则为真品，否则谨防假冒！");
        } 
        let isAccess = tj_public.getQueryString('access');
        if (isAccess === '1') {
            access();
        } 

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



        function show_tck() {
            $('#a-msg').fadeIn()
        }

        function close_tck() {
            $('#a-msg').hide()
        }
        // $('#ai').on('click', function () {
        //     window.location.href = 'https://tjfnew.china315net.com/tjswm/ai/route/route.ashx?compid=35374&cpid={{label_code}}';
        // });
        $('.gzh').on('click', function () {
            window.location.href = 'https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzI3NTI1ODA3Ng==#wechat_redirect';
        });


    </script>
</body>

</html>