<!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/css/136279/main.css" rel="stylesheet" />
    <title>悟以汐</title>
</head>

<body>
    <div class="page__bd">
        <div class="weui-tab">
            <div class="weui-tab__panel" id="p2">
                <div class="fwcx page">
                    <div class="bg"><img src="/static/images/136279/kk1.png"></div>
                    <div class="div1">
                        <div class="div2">
                            <img src="" id="labelImg" style="width: 45%;" />
                            <!-- 三维码 -->
                            <div class="p p-3">
                                <p>1、请用手触摸实物标签上的结构三维码是否有物理凹感！</p>
                                <p>
                                    2、请认真核对实物标签上的结构三维码、序号是否与上图一致！
                                </p>
                                <p>
                                    3、以上两点都相符则为真品，否则谨防假冒!
                                </p>
                            </div>
                            <!-- 箱标 -->
                            <div class="p p-2">
                                <p>1、请用手触摸实物标签上的结构三维码是否有物理凹感！</p>
                                <p>
                                    2、请认真核对实物标签上的结构三维码、序号是否与上图一致！
                                </p>
                                <p>
                                    3、以上两点都相符则为真品，否则谨防假冒!
                                </p>
                            </div>
                            <hr>
                            <div class="info">
                                <p>标签序号：<span id="cpidSpan"></span></p>
                                <p>首查时间：<span id="firstTime"></span></p>
                                <p>已查次数：<span id="queryNum">0</span> 次</p>
                            </div>
                            <hr style="margin-bottom: 1rem;">
                            <div class="tips">
                                <div>
                                    <img src="/static/images/136279/forg-icon-genuine.png"
                                        style="width: 3rem;margin-right: .3rem;">
                                    <p style="flex: 1; color:rgb(5, 152, 79)">您所查询的是悟以汐茶业的正牌产品标识！感谢您的支持！</p>
                                </div>
                            </div>
                            <div class="aidiv">
                                <p>
                                    您还可以点击下方按钮进行AI身份验证
                                </p>
                                <div id="ai" class="aibtn">AI匹配验证</div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="qyjs page">
                    <div class="bg"><img src="/static/images/136279/kk1.png"></div>
                    <div class="div1" style="text-align: left;">
                        <div class="div2">
                            <p style="margin-top: 4rem;">
                                武夷山悟以汐茶业有限公司是一家以互联网技术为核心的电子商务公司。公司坚持以“为客户选好茶”为奋斗目标，大力发展健康茶产业，用优良的茶叶品质，传承发扬中华优秀茶文化，推进茶文化进入市民大众的视线中，推动“茶为国饮、科学饮茶”融入老百姓的日常生活。争取做到我们卖出的每一片茶叶都让客户放心而赞不绝口。
                            </p>
                        </div>
                    </div>
                </div>
                <div class="cpjs page">
                    <img src="/static/images/136279/kt.png" style="padding-top: .5rem;" />
                    <img src="/static/images/136279/cp/pro-1.jpg" id="pro-1" class="padd cpimg" />
                    <img src="/static/images/136279/cp/pro-2.jpg" id="pro-2" class="padd cpimg" />
                    <img src="/static/images/136279/cp/pro-3.jpg" id="pro-3" class="padd cpimg" />
                    <img src="/static/images/136279/cp/pro-4.jpg" id="pro-4" class="padd cpimg" />
                    <img src="/static/images/136279/cp/pro-5.jpg" id="pro-5" class="padd cpimg" />
                    <img src="/static/images/136279/cp/pro-6.jpg" id="pro-6" class="cpimg" />
                    <img src="/static/images/136279/kt.png" style="padding-top: .5rem;transform: rotateX(180deg)" />
                </div>
            </div>
            <div class="tabbar">
                <div class="weui-tabbar">
                    <div id="cx" class="weui-tabbar__item weui-bar__item_on">
                        <div class="weui-tabbar__icon">
                            <img src="/static/images/136279/but-forgery.png" />
                        </div>
                        <p class="weui-tabbar__label">防伪查询</p>
                    </div>
                    <div id="qy" class="weui-tabbar__item">
                        <div class="weui-tabbar__icon">
                            <img src="/static/images/136279/btn-business.png" />
                        </div>
                        <p class="weui-tabbar__label">公司介绍</p>
                    </div>
                    <div id="cp" class="weui-tabbar__item">
                        <div class="weui-tabbar__icon">
                            <img src="/static/images/136279/btn-product.png" />
                        </div>
                        <p class="weui-tabbar__label">产品介绍</p>
                    </div>
                </div>
            </div>
        </div>

        <script type="text/javascript" src="https://res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
        <script type="text/javascript" src="https://res.wx.qq.com/t/wx_fed/weui.js/res/1.2.13/weui.min.js"></script>
        <script src="/static/js/jquery-2.1.0.min.js"></script>
        <script src="/static/js/public/public.js"></script>
        <script>
            var cpid = "{{label_code}}";
            console.log(cpid);

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

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

                let author = tj_public.getQueryString('access');
                if (author === '1') {
                    access();
                }
                function access() {
                    $('.aidiv').hide();
                    $('.tips').show();
                }

                var uid = tj_public.getCookie('TJWX_consumer_id');
                var label_code = tj_public.getCookie('label_code');
                // getInfo(0, 0)
                function getInfo(lat, lng) {
                    $.ajax({
                        url: '/wx/label/scan_record/',
                        data: { lat: lat, lng: lng, uid: uid, compid: 136279, 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 pid = res.product_id
                                if (pid) {
                                    $('.cpimg').hide();
                                    if (pid == '4510') {
                                        $('#pro-1').show();
                                    }
                                    else if (pid == '4511') {
                                        $('#pro-2').show();
                                    }
                                    else if (pid == '4512') {
                                        $('#pro-3').show();
                                    }
                                    else if (pid == '4513') {
                                        $('#pro-4').show();
                                    }
                                    else if (pid == '4514') {
                                        $('#pro-5').show();
                                    }
                                    else if (pid == '4515') {
                                        $('#pro-6').show();
                                    }
                                }

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

                $('.weui-tabbar__item').on('click', function () {
                    $(this).addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');
                    $('.page').hide();
                    document.body.scrollTop = document.documentElement.scrollTop = 0;
                    $('.page').animate({ scrollTop: 0 });
                });
                $('#cx').on('click', function () {
                    $('.fwcx').show();
                });
                $('#qy').on('click', function () {
                    $('.qyjs').show();
                });
                $('#cp').on('click', function () {
                    $('.cpjs').show();
                });
                $('#ai').on('click', function () {
                    window.location.href = 'https://tjfnew.china315net.com/tjswm/ai/route/route.ashx?compid=136279&cpid={{label_code}}';
                });
            });
        </script>
</body>

</html>