@extends('base.base')
@section('base')
    <!-- 内容区域 -->
    <div class="main-panel">
        <div class="content-wrapper">
            <div class="page-header">
                <h3 class="page-title">
                     <span class="page-title-icon bg-gradient-primary text-white mr-2">
                        <i class="mdi mdi-settings"></i>
                    </span>

                    {{ __('auto.关联设备') }}
                </h3>
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item"><a href="#">{{ __('auto.关联设备') }}</a></li>
                        <li class="breadcrumb-item active" aria-current="page">{{ __('auto.关联设备') }}</li>
                    </ol>
                </nav>
            </div>

            <div class="row">
                <div class="col-lg-12 grid-margin stretch-card">
                    <div class="card">
                        <div class="card-body">
                            <a href="javascript:history.back(-1)">{{ __('auto.返回上一页') }}</a>
                            <br>
                            <h4 class="card-title">{{ __('auto.设备码：') }}{{$mac}}</h4>
                            <h3 class="card-title">{{ __('auto.关联设备，设备码') }}</h3>

                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th width="6%">{{ __('auto.会员') }}ID</th>
                                    <th width="6%">{{ __('auto.昵称') }}</th>
                                    <th width="6%">{{ __('auto.渠道') }}</th>
                                    <th width="6%">{{ __('auto.注册日期') }}</th>
                                    <th width="6%">{{ __('auto.用设备登陆次数') }}</th>
                                    <th width="6%">{{ __('auto.总充值') }}</th>
                                    <th width="6%">{{ __('auto.总提现') }}</th>

                                </tr>
                                </thead>
                                <tbody>
                                @foreach($list as $item)
                                <tr>
                                    <td>
                                        <a href="/admin/global/id_find?UserID={{$item->UserID}}">
                                            {{$item->GameID}}
                                        </a>
                                    </td>
                                    <td>{{$item->NickName}}</td>
                                    <td>{{$item->Channel}}</td>
                                    <td>{{date('Y-m-d H:i:s',strtotime($item->RegisterDate))}}</td>
                                    <td>{{$item->login_count}}</td>
                                    <td>{{$item->Recharge ?? 0}}</td>
                                    <td>{{($item->Withdraw ?? 0) / 100}}</td>
                                </tr>
                                @endforeach
                                </tbody>
                            </table>
                            <div class="box-footer clearfix" id = "pages">
                                {{ __('auto.总共') }} <b>{{ $list->appends([
                                        'list'=>$list,
                                        'id'=>$id,
                                        'RegisterMobile'=>$RegisterMobile ?? ""

])->total() }}</b> {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
                                {!! $list->links() !!}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

@endsection
