@extends('base.base')
@section('base')
    <!-- 内容区域 -->
    <div class="main-panel">
        <div class="content-wrapper">
            <div class="row">
                <div class="col-12 grid-margin stretch-card">
                    <div class="card">
                        <div class="card-body">
                            <h4 class="card-title">{{ __('auto.玩家详情') }}</h4>
                            {{--<p class="card-message">--}}
                            {{--Basic form elements--}}
                            {{--</p>--}}
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th>{{ __('auto.用户') }}ID</th>
                                    <th>{{ __('auto.用户昵称') }}</th>
                                    <th>{{ __('auto.团队人数') }}</th>
                                    <th>{{ __('auto.直属代理人数') }}</th>
                                    <th>{{ __('auto.直属玩家人数') }}</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($list as $k=>$v)
                                    <tr>
                                        <td style="width: 13%">{{ $v->GameID }}</td>
                                        <td style="width: 10%">{{ $v->NickName }}</td>
                                        <td style="width: 10%">{{ $v->spread_num }}</td>
                                        <td style="width: 12%">
                                            @if($v->subordinate_num == 0)
                                                0
                                            @else
                                                <a href="/admin/subordinate/subs/{{$v->UserID}}">{{ $v->subordinate_num }}</a>
                                            @endif
                                        </td>
                                        <td style="width: 10%"><button type="button" class="btn btn-sm btn-gradient-dark btn-icon-text" onclick="players({{ $v->UserID }})">{{ $v->players_num }}</button></td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                                <dl>
                                    <a href="#" onClick="javascript :history.back(-1);"><font size="3">{{ __('auto.返回上一页') }}</font></a>
                                </dl>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        function players(id){
            var page = layer.open({
                type: 2,
                title: '{{ __('auto.玩家列表') }}',
                shadeClose: true,
                shade: 0.8,
                area: ['50%', '80%'],
                content: '/admin/subordinate/players/'+id
            });
        }
    </script>
@endsection
