@extends('admin::frame')

@section('pageTitle','后台首页')

@section('adminScript')
    @parent
    <script>var __version_check_url = '{{\App\Constant\AppConstant::VERSION_CHECK_URL}}';</script>
    <script src="@assets('assets/admin/js/versionCheck.js')"></script>
@endsection

@section('bodyContent')

    @if (env('ADMIN_DEMO_USER_ID', 0) && $_adminUserId == env('ADMIN_DEMO_USER_ID', 0))
        <div class="uk-alert uk-alert-danger">
            当前账号为 <strong>演示账号</strong>，不能进行 增加/编辑/删除 操作。
        </div>
    @endif

    <div class="uk-grid">
        <div class="uk-width-1-4">
            <div class="admin-block-stat">
                <div class="icon green">
                    <i class="uk-icon-list"></i>
                </div>
                <a class="number" href="{{action('\App\Modules\Scratch\Manage\HomeController@index')}}">
                    {{number_format(\Edwin404\Base\Support\ModelHelper::count('module_scratch_activity'))}}
                </a>
                <div class="name">
                    活动总数
                </div>
            </div>
        </div>
        <div class="uk-width-1-4">
            <div class="admin-block-stat">
                <div class="icon red">
                    <i class="uk-icon-users"></i>
                </div>
                <a class="number" href="{{action('\App\Modules\Scratch\Manage\HomeController@index')}}">
                    {{number_format(\Edwin404\Base\Support\ModelHelper::count('member_user'))}}
                </a>
                <div class="name">
                    总参加人数
                </div>
            </div>
        </div>
    </div>

    @if(0)
    <div class="uk-grid">
        <div class="uk-width-1-4">
            <div class="admin-block-stat">
                <div class="icon green">
                    <i class="uk-icon-users"></i>
                </div>
                <a class="number" href="{{action('\App\Http\Controllers\Admin\UserController@dataList')}}">
                    {{number_format(\Edwin404\Base\Support\ModelHelper::count('user'))}}
                </a>
                <div class="name">
                    账号会员总数
                </div>
            </div>
        </div>
        <div class="uk-width-1-4">
            <div class="admin-block-stat">
                <div class="icon dark">
                    <i class="uk-icon-tasks"></i>
                </div>
                <a class="number" href="{{action('\App\Http\Controllers\Admin\UserPayJobController@dataList')}}">
                    {{number_format(\Edwin404\Base\Support\ModelHelper::count('user_pay_job'))}}
                </a>
                <div class="name">
                    支付队列
                </div>
            </div>
        </div>
    </div>

    @endif

    <div class="uk-grid">
        <div class="uk-width-1-2">
            <div class="admin-block">
                <div class="head"><i class="uk-icon-cog"></i> 系统概况</div>
                <div class="body" style="height:160px;">
                    <div>
                        版本：<span>V{{\App\Constant\AppConstant::VERSION}}</span>
                    </div>
                    <div style="padding:10px 0 0 0;" data-admin-version="{{\App\Constant\AppConstant::VERSION}}"></div>
                </div>
            </div>
        </div>
        <div class="uk-width-1-2">
            <div class="admin-block">
                <div class="head"><i class="uk-icon-copyright"></i> 版权说明</div>
                <div class="body" style="height:160px;">
                    <table class="uk-table">
                        <tbody>
                        <tr>
                            <td>
                                使用中遇到问题请 <a href="http://www.tecmz.com/product/{{\App\Constant\AppConstant::NAME}}" target="_blank">反馈给我们</a>，如需系统定制请 <a href="http://www.tecmz.com/product/wx" target="_blank">联系我们</a>。
                            </td>
                        </tr>
                        <tr>
                            <td>
                                请您在使用过程中始终保留版权，如需商业授权请<a href="http://www.tecmz.com/product/{{\App\Constant\AppConstant::NAME}}" target="_blank">联系我们进行授权</a>。
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <a href="http://www.tecmz.com/product/{{\App\Constant\AppConstant::NAME}}" target="_blank">&copy; tecmz.com</a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>

@endsection