| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333 |
- <script src="{{static_url('yunshop/js')}}/video.min.js"></script>
- @extends('layouts.base')
- @section('content')
- @section('title', trans('历史直播列表'))
- @include('layouts.tabs')
- <link href="{{static_url('yunshop/css')}}/video-js.min.css" rel="stylesheet">
- <div class="right-titpos">
- <ul class="add-snav">
- <li class="active"><a href="#">历史直播列表</a></li>
- </ul>
- </div>
- <div class='panel panel-default'>
- <form action="" method="post" class="form-horizontal" id="form1">
- <div class="panel panel-info">
- <div class="panel-body">
- <div class="form-group col-xs-12 col-sm-2">
- <!--<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">会员信息</label>-->
- <!--<div class="col-xs-12 col-sm-8 col-lg-9">-->
- <input class="form-control" name="search[room_title]" id="" type="text"
- value="{{$search['room_title']}}" placeholder="直播间标题">
- <!--</div>-->
- </div>
- <div class="form-group col-xs-12 col-sm-2">
- <!--<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">会员信息</label>-->
- <!--<div class="col-xs-12 col-sm-8 col-lg-9">-->
- <input class="form-control" name="search[room_id]" id="" type="text"
- value="{{$search['room_id']}}" placeholder="直播间ID">
- <!--</div>-->
- </div>
- <div class="form-group col-xs-12 col-sm-2">
- <!--<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">会员信息</label>-->
- <!--<div class="col-xs-12 col-sm-8 col-lg-9">-->
- <input class="form-control" name="search[member_id]" id="" type="text"
- value="{{$search['member_id']}}" placeholder="直播会员ID">
- <!--</div>-->
- </div>
- <div class="form-group col-xs-12 col-sm-2">
- <!--<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">会员信息</label>-->
- <!--<div class="col-xs-12 col-sm-8 col-lg-9">-->
- <input class="form-control" name="search[member]" id="" type="text"
- value="{{$search['member']}}" placeholder="主播昵称/姓名/手机">
- <!--</div>-->
- </div>
- <div class="form-group col-xs-12 col-sm-3">
- <select name='search[is_show]' class='form-control'>
- <option value=''>显示状态</option>
- <option value='1' @if($search['is_show'] == '1') selected @endif>显示</option>
- <option value='2' @if($search['is_show'] == '2') selected @endif>不显示</option>
- </select>
- </div>
- <div class="form-group col-xs-12 col-sm-3">
- <select name='search[recommend]' class='form-control'>
- <option value=''>推荐状态</option>
- <option value='1' @if($search['recommend'] == '1') selected @endif>推荐</option>
- <option value='2' @if($search['recommend'] == '2') selected @endif>不推荐</option>
- </select>
- </div>
- <div class="form-group col-xs-12 col-sm-8">
- <div class="col-sm-3">
- <label class='radio-inline'>
- <input type='checkbox' value='1' name='search[is_time]'
- @if($search['is_time'] == '1') checked @endif>搜索
- </label>
- </div>
- {!! app\common\helpers\DateRange::tplFormFieldDateRange(
- 'search[time]',
- [
- 'starttime'=>$search['time']['start'],
- 'endtime'=>$search['time']['end'],
- 'start'=>$search['time']['start'],
- 'end'=>$search['time']['end']
- ],
- true
- ) !!}
- </div>
- <div class="form-group col-xs-12 col-sm-7 col-lg-4">
- <div class="">
- <input type="hidden" id="route" name="route" value="plugin.room.admin.history.index"/>
- <button class="btn btn-success "><i class="fa fa-search"></i> 搜索</button>
- <input type="button" class="btn btn-success" id="export" value="导出">
- </div>
- </div>
- </div>
- </div>
- </form>
- </div>
- <div class='panel panel-default'>
- <div class='panel-heading'>
- <div>
- <div>
- 总数:{{$list->total()}}
- </div>
- </div>
- <div class='panel-body'>
- <table class="table table-hover" style="overflow:visible;">
- <thead>
- <tr>
- <th style='width:6%;'>ID</th>
- <th style='width:15%;'>时间</th>
- <th style='width:8%;'>直播间ID</th>
- <th style='width:10%;'>直播间标题</th>
- <th style='width:10%;'>主播</th>
- <th style='width:10%;'>姓名<br>手机号</th>
- <th style='width:10%;'>过期时间</th>
- <th style='width:10%;'>直播回放</th>
- <th style='width:10%;'>显示</th>
- <th style='width:10%;'>推荐</th>
- <th style='width:10%;'>操作</th>
- </tr>
- </thead>
- <tbody>
- @foreach($list as $row)
- <tr>
- <td>{{$row['id']}}</td>
- <td>{{$row['created_at']}}</td>
- <td>{{$row['room_id']}}</td>
- <td>{{$row['hasOneRoom']['title']}}</td>
- <td>
- <a target="_blank"
- href="{{yzWebUrl('member.member.detail',['id'=>$row['hasOneMember']['uid']])}}">
- <img src="{{tomedia($row['hasOneMember']['avatar'])}}"
- style="width: 30px; height: 30px;border:1px solid #ccc;padding:1px;">
- </br>
- {{$row['hasOneMember']['nickname']}}
- </a>
- </td>
- <td>
- {{$row['hasOneMember']['realname']}}<br>
- {{$row['hasOneMember']['mobile']}}
- </td>
- <td>
- @if($row['expire_time'] == 0)
- 永久保存
- @else
- {{date('Y-m-d',$row['expire_time'])}}
- @endif
- </td>
- <td style="width: 100px;height: 100px">
- <a data-toggle="modal" data-target="#modal-confirmsend{{$row['id']}}" onclick="openVideo({{$row['id']}})">
- <img src="{{tomedia($row['hasOneRoom']['cover'])}}" style="width: 100%;height: 100%"/>
- </a>
- </td>
- <td style="overflow:visible;">
- <div class="col-sm-2 col-xs-6">
- <input class="mui-switch " id="is_show{{$row['id']}}" type="checkbox"
- @if($row['is_show'] == 1))
- checked
- @endif
- onclick="show({{$row['id']}})"/>
- </div>
- </td>
- <td style="overflow:visible;">
- <div class="col-sm-2 col-xs-6">
- <input class="mui-switch " id="recommend{{$row['id']}}" type="checkbox" style="overflow: auto"
- @if($row['recommend'] == 1))
- checked
- @endif
- onclick="recommend({{$row['id']}})"/>
- </div>
- </td>
- <td style="position:relative; overflow:visible;">
- <a href="{{yzWebUrl('plugin.room.admin.history.delete',['id'=>$row['id']])}}"
- onclick="return confirm('是否确认删除?');
- return false;" class="btn btn-default btn-sm"
- title="删除"><i
- class="fa fa-trash"></i></a>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- {!! $pager !!}
- </div>
- @foreach($list as $row)
- <div id="modal-confirmsend{{$row['id']}}" class="modal fade" role="dialog" style="">
- <div class="form-horizontal form">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button aria-hidden="true" data-dismiss="modal" class="close" type="button">X</button>
- <h5 style="">直播回放</h5>
- </div>
- @if($row['file_format'] == 'hls')
- <video id="example_video{{$row['id']}}" class="video-js vjs-default-skin" controls preload="none">
- <source src="{{str_replace('http://','https://',$row['video_url'])}}" type="application/x-mpegURL">
- </video>
- @elseif($row['file_format'] == 'mp4')
- <video id="example_video{{$row['id']}}" class="video-js vjs-default-skin" controls preload="none">
- <source src="{{str_replace('http://','https://',$row['video_url'])}}" type="video/mp4">
- </video>
- @endif
- <div class="modal-footer">
- <span>时长{{intval($row['duration']/60)}}分钟 大小{{intval($row['file_size']/1024/1024)}}M</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- @endforeach
- </div>
- <div style="width:100%;height:150px;"></div>
- <script language='javascript'>
- function openVideo(id) {
- var video_id = "example_video"+id;
- var player = videojs(video_id, {
- muted: true,
- controls: true,
- height: 400,
- width: 600,
- loop: true,
- // 更多配置.....
- });
- }
- function show(id) {
- var url_open = "{!! yzWebUrl('plugin.room.admin.history.show') !!}"
- var url_close = "{!! yzWebUrl('plugin.room.admin.history.close-show') !!}"
- var postdata = {
- id: id,
- };
- var show = "#is_show" + id;
- if ($(show).is(':checked')) {
- //开
- $.post(url_open,postdata,function(data){
- if (data.result == 1) {
- $(show).attr("checked",true);
- showPopover($(show),"开启成功")
- } else {
- showPopover($(show),"开启失败")
- $(show).attr("checked",false);
- }
- }, "json");
- } else {
- //关
- $.post(url_close,postdata,function(data){
- showPopover($(show),"关闭成功")
- }, "json");
- }
- }
- function recommend(id) {
- var url_open = "{!! yzWebUrl('plugin.room.admin.history.recommend') !!}"
- var url_close = "{!! yzWebUrl('plugin.room.admin.history.close-recommend') !!}"
- var postdata = {
- id: id,
- };
- var recommend = "#recommend" + id;
- if ($(recommend).is(':checked')) {
- //开
- $.post(url_open,postdata,function(data){
- if (data.result == 1) {
- $(recommend).attr("checked",true);
- showPopover($(recommend),"开启成功")
- } else {
- showPopover($(recommend),"开启失败")
- $(recommend).attr("checked",false);
- }
- }, "json");
- } else {
- //关
- $.post(url_close,postdata,function(data){
- showPopover($(recommend),"关闭成功")
- }, "json");
- }
- }
- function showPopover(target, msg) {
- target.attr("data-original-title", msg);
- $('[data-toggle="tooltip"]').tooltip();
- target.tooltip('show');
- target.focus();
- //2秒后消失提示框
- setTimeout(function () {
- target.attr("data-original-title", "");
- target.tooltip('hide');
- }, 2000
- );
- }
- $(function () {
- $('#export').click(function () {
- $('#route').val("plugin.room.admin.history.export");
- $('#form1').submit();
- $('#route').val("plugin.room.admin.history.index");
- });
- });
- </script>
- @endsection
|