<!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" />
    <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/165980/main.css" rel="stylesheet" />
    <title>贵州省仁怀市茅河商贸有限公司</title>
</head>

<body>
    <div class="weui-tab">
        <div class="weui-tab__panel">

            <div class="fwcx page">
                <div class="div1 ">
                    <div class="bq">
                        <div class="ggy">
                            <div class="ggy2">
                                <img src="/static/images/165980/g2.png"
                                     style="width: 100%; padding-top: 1rem" />
                                <p style="padding: 1rem">请刮开防伪标签上的验证码</p>
                            </div>
                        </div>
                        <div style="text-align:left;padding-left:2rem;margin-top:.5rem">
                            <p style="font-size: .9rem">咨询电话:4006801688</p>
                        </div>

                        <b style="font-size: 20px"> 请输入验证码 </b>
                        <input id="input_yzm"
                               type="text"
                               placeholder="请输入验证码"
                               style="
            border-radius: 10px;
            width: 75%;
            padding: 0.5rem 0.5rem;
            font-size: 15px;
            text-align: center;
          " />
                        <div class="btn" onclick="showfwjg()">确定</div>
                    </div>
                </div>
                <div class="fwjg">
                    <div style="font-size: 23px; color: rgb(0, 0, 139)">
                        <b> 防伪结果 </b>
                    </div>
                    <div style="
          font-size: 18px;
          background-color: rgb(233, 228, 230);
          color: rgb(0, 0, 139);
          padding: 1rem 0.8rem 0.5rem;
          border-radius: 8px;
          margin: 1rem 0;
        ">
                        <p id="warn">
                            您好，您所查询的是[贵州省仁怀市茅河商贸有限公司]的正品产品，请放心使用!
                        </p>
                    </div>
                    <div style="font-size: 23px; color: rgb(198, 0, 9)">
                        <b> 重要提示 </b>
                    </div>
                    <div style="
          font-size: 14px;
          background-color: rgb(233, 228, 230);
          padding: 0.5rem 0.8rem 0.5rem;
          margin: 1rem 0;
          border-radius: 8px;
        ">
                        <p>扫描您所购买的产品上的防伪码进行产品真伪的验证。</p>
                        <p>
                            如:[您好，您所查询的是贵州省仁怀市茅河商贸有限公司正品产品，请放心使用!]则您购买的产品是真品。如:[您好，该码已被查询*次，首次查询时间为:***该号码已经失效，谨防假冒!1请确认此前您是否查询过该产品上的防伪码，如果此前不是您本人查询请与所购买的商家联系!
                        </p>
                        <p>
                            如:[您好，您所查询的号码不存在，谨防假冒!1，请与所购买的商家联系，或者直接与生产厂家联系!
                        </p>
                        <p style="text-align:center;font-size:.9rem;margin:1rem 0 .5rem;">咨询电话:4006801688</p>
                    </div>
                </div>
            </div>
            <div class="qyjs page">
                <img src="/static/images/165980/t1.png" style="width:100%" />
            </div>
        </div>
        <div class="weui-tabbar">
            <div id="cx" class="weui-tabbar__item">
                <div class="weui-tabbar__icon">
                    <img src="/static/images/165980/d1.png" style="width:100%" />
                </div>
                <p class="weui-tabbar__label">防伪查询</p>
            </div>
            <div id="qy" class="weui-tabbar__item">
                <div class="weui-tabbar__icon">
                    <img src="/static/images/165980/d2.png" style="width:100%" />
                </div>
                <p class="weui-tabbar__label">企业介绍</p>
            </div>
        </div>
    </div>

    <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.wxInit({
        wx_officail_account_id: 6,
        url: window.location.href,
      });

      var uid = tj_public.getCookie("TJWXUSR_165980_0");
      var cpid = tj_public.getCookie("label_code");

      var weidu = 0;
      var jingdu = 0;
      wx.ready(function () {
        tj_public.getAddress(function (lat, lng) {
          weidu = lat;
          jingdu = lng;
          tj_public.hideLoading();
        });
      });

      wx.error(function (res) {
        tj_public.hideLoading();
      });

      function getInfo() {
        tj_public.showLoading();
        $.ajax({
          url: "/wx/label/scan_record/",
          data: {
            lat: weidu,
            lng: jingdu,
            uid,
            compid: 165980,
            fwcode: cpid,
          },
          success: function (res) {
            tj_public.hideLoading();
            if (res.e === "") {
              if (res.cnt <= 1) {
                $("#warn").text(
                  "您好，您所查询的是[贵州省仁怀市茅河商贸有限公司]的正品产品，请放心使用!"
                );
              } else {
                $("#warn").text(
                  `您好，该码已被查询${res.cnt}次，首次查询时间为:${res.tm_1st}，该号码已经失效，谨防假冒！请确认此前您是否查询过该产品上的防伪码，如果此前不是您本人查询请与所购买的商家联系！`
                );
              }
              $(".div1").hide();
              $(".fwjg").fadeIn();
            } else {
              alert("网络超时，请稍后再试！");
              WeixinJSBridge.call("closeWindow");
            }
          },
          error: function () {
            tj_public.hideLoading();
            alert("网络超时，请稍后再试！");
            WeixinJSBridge.call("closeWindow");
          },
        });
      }

      function showfwjg() {
        tj_public.checkYzm(function () {
          getInfo();
        });
      }
        $(function () {
            $('.weui-tabbar__item').on('click', function () {
                $('.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();
            });
        });
    </script>
</body>
</html>
