<?php /*a:3:{s:93:"/home/u833649990/domains/beyondtravel.tours/public_html/app/app/admin/view/index/welcome.html";i:1763702585;s:93:"/home/u833649990/domains/beyondtravel.tours/public_html/app/app/admin/view/public/header.html";i:1763702586;s:93:"/home/u833649990/domains/beyondtravel.tours/public_html/app/app/admin/view/public/footer.html";i:1763702586;}*/ ?>
<!doctype html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>后台登录-<?php echo htmlentities($system_name); ?></title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="stylesheet" href="/static/admin/css/font.css">
    <link rel="stylesheet" href="/static/admin/css/xadmin.css">
    <script type="text/javascript" src="/static/admin/js/jquery.min.js"></script>
    <!-- <link rel="stylesheet" href="./css/theme5.css"> -->
    <script src="/static/admin/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/admin/js/xadmin.js?date=<?php echo date('Ymd'); ?>"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="/static/admin/js/html5.min.js"></script>
    <script src="/static/admin/js/respond.min.js"></script>
    <![endif]-->
</head>

<body>
<div class="x-nav">
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       onclick="location.reload()" title="刷新">
        <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
    </a>
</div>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">
                    数据统计
                    <div class="layui-input-inline" style="margin: 5px;float: right;width: 180px">
                        <input type="text" placeholder="日期时间" autocomplete="off" readonly
                               id="start_time" value="" class="layui-input">
                    </div>
                </div>
                <div class="layui-card-body ">
                    <ul class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog">
                        <li class="layui-col-md3 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>用户总量</h3>
                                <p>
                                    <cite id="user_total"><?php echo htmlentities((isset($user_total) && ($user_total !== '')?$user_total:'0')); ?></cite>
                                </p>
                                <span>当前用户总数量-正式用户</span>
                            </a>
                        </li>
                        <li class="layui-col-md3 layui-col-xs6 ">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>商品总量</h3>
                                <p>
                                    <cite id="goods_total"><?php echo htmlentities((isset($goods_total) && ($goods_total !== '')?$goods_total:'0')); ?></cite>
                                </p>
                                <span>商品总量</span>
                            </a>
                        </li>
                        <li class="layui-col-md3 layui-col-xs6 ">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>订单总量</h3>
                                <p>
                                    <cite id="order_total"><?php echo htmlentities((isset($order_total) && ($order_total !== '')?$order_total:'0')); ?></cite>
                                </p>
                                <span>订单量-正式</span>
                            </a>
                        </li>
                        <li class="layui-col-md3 layui-col-xs6 ">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>已完成订单金额</h3>
                                <p>
                                    <cite id="order_price_total"><?php echo htmlentities((isset($order_price_total) && ($order_price_total !== '')?$order_price_total:'0')); ?></cite>
                                </p>
                                <span>已提交订单总金额-正式</span>
                            </a>
                        </li>
                        <li class="layui-col-md3 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>任务人数</h3>
                                <p>
                                    <cite id="task_people"><?php echo htmlentities((isset($task_people) && ($task_people !== '')?$task_people:'0')); ?></cite>
                                </p>
                                <span>做单当天人数-测试用户</span>
                            </a>
                        </li>
                        <li class="layui-col-md3 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>首充人数</h3>
                                <p>
                                    人数：<cite id="first_recharge_people"><?php echo htmlentities((isset($first_recharge_people) && ($first_recharge_people !== '')?$first_recharge_people:'0')); ?></cite>
                                    金额：<cite id="first_recharge_price"><?php echo htmlentities((isset($first_recharge_price) && ($first_recharge_price !== '')?$first_recharge_price:'0')); ?></cite>
                                </p>
                                <span>当天充值人数及金额-正式用户</span>
                            </a>
                        </li>
                        <li class="layui-col-md3 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>注册人数</h3>
                                <p>
                                    <cite id="register_people"><?php echo htmlentities((isset($register_people) && ($register_people !== '')?$register_people:'0')); ?></cite>
                                </p>
                                <span>当天注册人数-正式用户</span>
                            </a>
                        </li>
                        <li class="layui-col-md3 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>充值金额</h3>
                                <p>
                                    <cite id="recharge_total"><?php echo htmlentities((isset($recharge_total) && ($recharge_total !== '')?$recharge_total:'0')); ?></cite>
                                </p>
                                <span>当天总充值金额-正式</span>
                            </a>
                        </li>
                        <li class="layui-col-md3 layui-col-xs6 ">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>提现金额</h3>
                                <p>
                                    <cite id="with_total"><?php echo htmlentities((isset($with_total) && ($with_total !== '')?$with_total:'0')); ?></cite>
                                </p>
                                <span>当天总提现金额-正式</span>
                            </a>
                        </li>
                        <li class="layui-col-md3 layui-col-xs6 ">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>总余额</h3>
                                <p>
                                    <cite id="diff_price"><?php echo htmlentities((isset($diff_price) && ($diff_price !== '')?$diff_price:'0')); ?></cite>
                                </p>
                                <span>当天的充值提现余额差-正式</span>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
</body>
<script type="text/javascript">
    layui.use(['laydate'], function () {
        var laydate = layui.laydate;
        laydate.render({
            elem: '#start_time', //指定元素
            type: 'date',
            range: true,
            done: function (value, date, endDate) {
                var index = layer.load(2, {shade: 0.05, time: 0});
                $.ajax({
                    url: "<?php echo url('admin/Index/welcome'); ?>",
                    type: 'post',
                    data: {'date': value},
                    dataType: 'json',
                    success: function (res) {
                        layer.close(index);
                        $('#task_people').text(res.data.task_people);
                        $('#first_recharge_people').text(res.data.first_recharge_people);
                        $('#first_recharge_price').text(res.data.first_recharge_price);
                        $('#register_people').text(res.data.register_people);
                        $('#recharge_total').text(res.data.recharge_total);
                        $('#with_total').text(res.data.with_total);
                        $('#diff_price').text(res.data.diff_price);
                    },
                    error: function () {
                        layer.close(index);
                        tipAction(2, '系统繁忙');
                    }
                });
            }
        });
    });
</script>
</html>
<script type="application/javascript">
    /**
     * 统一接口返回提示弹窗
     * type 1-成功 2-失败
     * info 提示信息
     * */
    function tipAction(type, info) {
        layer.msg(info, {icon: type, time: 1500})
    }

    //图片放大
    function showBig(obj) {
        let img_src = $(obj).attr('src');
        layer.open({
            type: 1,
            area: ['70%', 'auto'],
            shadeClose: true,
            title: false,
            closeBtn: false,
            content: `<div style=""><img src="${img_src}" alt="" width="100%"></div>`
        });
    }
</script>

