@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">
                            <h4 class="card-title">{{ __('auto.渠道操作日志') }}</h4>

                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th width="5%">{{ __('auto.渠道名称') }}</th>
                                    <th width="8%">{{ __('auto.审核开关') }}</th>
                                    <th width="8%">{{ __('auto.安卓版本') }}</th>
                                    <th width="8%">{{ __('auto.操作人') }}</th>
                                    <th width="8%">{{ __('auto.操作日期') }}</th>


                                </tr>
                                </thead>
                                <tbody>
                                @foreach($list as $k=>$v)
                                    <tr>
                                        <td>{{$v->ChannelName}}</td>
                                        <td>
                                            @if ($v->ReviewState == 1)
                                                {{ __('auto.开放') }}
                                            @else
                                                {{ __('auto.关闭') }}
                                            @endif
                                        </td>
                                        <td>{{$v->AndroidVersion}}</td>
                                        <td>{{$v->account}}</td>
                                        <td>{{$v->create_at}}</td>

                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                            <div class="box-footer clearfix" id="pages">
                                {{ __('auto.总共') }} <b>{{ $list->appends([
                                        'list'=>$list,

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

        function switch_control(id, ChannelIndex, AndroidVersion, type) {

            myConfirm("{{ __('auto.操作不可逆,是否继续') }}?", function () {
                myRequest("/admin/channel/switch/" + id, "post", {ChannelIndex, AndroidVersion, type}, function (res) {
                    layer.msg(res.msg)
                    setTimeout(function () {
                        window.location.reload();
                    }, 1500)
                });
            });
        }




    </script>
@endsection
