<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <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/public/Activity.css" rel="stylesheet" />
    <link href="/static/css/19257/main.css?v=3" rel="stylesheet" />
    <title>茗酒荟</title>
</head>

<body>
    <div id="c0" class="content-other">
        <img src="/static/images/19257/logo.png" />
        <div class="other-container">
            <div class="oc">
                <p class="other-title" style="text-align:center"><b>承德茗酒荟供应链管理有限公司</b></p>
                <p class="other-artcle">
                    承德茗酒荟供应链管理有限公司位于美丽的旅游名城-承德避暑山庄，公司以代理雪花啤酒、哈尔滨啤酒以及百威啤酒起步，经过十年的磨练，至今已发展成由盛世物流贸易公司、承德剑南春专卖店、龙润达酒行、平泉酒酷酒行、平泉论道茶餐厅等多个公司构成的知名民营企业。近年来，随着中国经济的持续发展，政府政策的不断支持，各项法规的逐步完善，承德盛世嘉年，秉承立百年基业，创盛世品牌，代理著名品牌，创造最优服务的发展理念，聚集现代优秀的人才和文化、建立科学的管理体系、汲取先进的技术，不断完善自我、超越自我、持续进步、再创辉煌！
                </p>
            </div>
        </div>
    </div>
    <div class="content-zwjb" id="c1" style="display:none">
        <div class="zw-container">
            <img src="/static/images/19257/logo.png" style="width:30%">
            <p class="zw-subtitle">查询结果</p>
            <img class="zw-fwimg" id="fwimg" />
            <p class="zw-point">请用手触摸实物标签上圆圈及圈内文字是否有物理凹感，并认真核对颜色、序号是否与上图信息一致，相符则为真品，否则为假冒产品！</p>
            <ul class="zw-wrapper">
                <li><span><b style="color:#000">标签序号：</b></span><span><b id="spancpid"
                            style="color:#000">{{label_code}}</b></span>
                </li>
                <li id="li1" style="display: none"><span>产品名称：</span><span id="proname"></span></li>
                <li id="li2" style="display: none"><span>生产单位：</span><span id="comp"></span></li>
                <div id="li3" style="display: none"></div>
            </ul>
        </div>
    </div>
    <div id="c2" class="content-zwjb">
        <div class="zw-container" style="width: 92%;top:10%">
            <img src="/static/images/19257/sc.jpg" style="width: 78%;">
            <p class="scp">请长按识别小程序码，进入茗酒荟精品商城</p>
        </div>
    </div>

    <ul class="footer">
        <li class="footer_item" onclick="changeTo(1)">
            <img src="/static/images/19257/zw.png" />
            <p>真伪查询</p>
        </li>
        <li class="footer_item" id="wx"
            onclick="window.location.href='https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzI4NjA0ODc3MQ==#wechat_redirect'">
            <img src="/static/images/19257/wx.png" style="width: 1.7rem;" />
            <p>关注微信</p>
        </li>
        <li class="footer_item" onclick="window.location.href='/mall/m/19257/1/'">
            <img src="/static/images/19257/jfsc.png" />
            <p>积分商城</p>
        </li>
        <li class="footer_item" id="jfsc" onclick="changeTo(2)">
            <img src="/static/images/19257/sc.png" />
            <p>精美商城</p>
        </li>
    </ul>
    <input type="hidden" id="Taward" value="{{award.data}}" />
    <button class="btn_return" onclick="changeTo(0)" id="btn_return" style="display:none">首页</button>
    <script src="/static/js/jquery-2.1.0.min.js"></script>
    <script src="/static/js/public/public.js?v=5"></script>
    <script src="/static/js/public/Activity.js?v=6"></script>
    <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
    <script>
        tj_public.wxInit({
            wx_officail_account_id: 9,
            url: window.location.href
        })
        tj_public.showLoading();

        let prev = 0;
        let labelType = 'common';
        let fwcode = '{{label_code}}';
        let cid = parseInt(fwcode);

        if (cid >= 103601408299 && cid <= 103601899203) {
            labelType = 'jkld';
        }

        function changeTo(to) {
            $("#c" + prev).fadeOut(300, function () {
                $("#c" + to).fadeIn();
            });
            if (prev == 0)
                $("#btn_return").fadeIn();
            if (to == 0)
                $("#btn_return").fadeOut();
            prev = to;
        }

        wx.ready(function () {
            tj_public.getAddress(function (lat, lng) {
                getInfo(lat, lng)
            })
        })

        wx.error(function (res) {
            getInfo(0, 0)
        });

        {% if is_need_yzm %}
        if (fwcode !== '103000793117')
            tj_public.showYzm(labelType);
        {% endif %}

        function getInfo(lat, lng) {
            $.ajax({
                url: '/wx/label/scan_record/',
                data: { lat: lat, lng: lng, uid: '{{consumer_id}}', compid: '{{company_id}}', fwcode },
                success: function (res) {
                    if (res.e === '') {
                        tj_public.hideLoading();
                        $("#spancpid").text(res.code);
                        $("#fwimg").attr("src", res.img);

                        if (res.product_name) {
                            $("#proname").text(res.product_name);
                            $("#li1").show();
                        }

                        if (res.company_name) {
                            $("#comp").text(res.company_name);
                            $("#li2").show();
                        }

                        var html = "";
                        if (res.inventory.length > 0) {
                            for (var inv of res.inventory) {
                                if (inv.voucher_type === '销售出库') {
                                    if (html == "") {
                                        html += `<li><span>物流信息：</span><span>由${inv.company}于${inv.time}发给${inv.to_company}</span><li>`;
                                    }
                                    else {
                                        html += `<li><span></span><span>由${inv.company}于${inv.time}发给${inv.to_company}</span><li>`;
                                    }
                                }
                            }
                            $("#li3").html(html);
                            if (res.agent_name) {
                                // $("#wuliu").text("由承德茗酒荟供应链管理有限公司于"+res.fh_time+"发给"+res.agent_name);
                                $("#li3").show();
                            }
                        }

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

        function checkYzmCallback() {
            tj_activity.GetActivity(19257);
        }
    </script>
</body>

</html>