123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- <include file="public@header" />
- </head>
- <body>
- <div class="wrap">
- <ul class="nav nav-tabs">
- <li class="active"><a >直播列表</a></li>
- <li><a href="{:url('Liveing/add')}">{:lang('ADD')}</a></li>
- </ul>
-
- <form class="well form-inline margin-top-20" method="post" action="{:url('Liveing/index')}">
- 时间:
- <input class="form-control js-bootstrap-date" name="start_time" id="start_time" value="{:input('request.start_time')}" aria-invalid="false" style="width: 110px;"> -
- <input class="form-control js-bootstrap-date" name="end_time" id="end_time" value="{:input('request.end_time')}" aria-invalid="false" style="width: 110px;">
- 关键字:
- <input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
- placeholder="请输入会员ID">
- <input type="submit" class="btn btn-primary" value="搜索">
- </form>
- <form method="post" class="js-ajax-form" >
- <table class="table table-hover table-bordered">
- <thead>
- <tr>
- <th>会员ID</th>
- <th>会员昵称</th>
- <th>直播ID</th>
- <th>直播开始时间</th>
- <th>直播分类</th>
- <th>房间类型</th>
- <th>密码/价格</th>
- <th>视频类型</th>
- <th>在线人数</th>
- <th>本场收益</th>
- <th>打赏人数</th>
- <th>人均打赏</th>
- <th>TaskId</th>
- <th>播流地址</th>
- <th>推流地址</th>
- <th>设备信息</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <foreach name="lists" item="vo">
- <tr>
- <td>{$vo.uid}</td>
- <td>{$vo['userinfo']['user_nicename']} </td>
- <td>{$vo['showid']}</td>
- <td>{:date('Y-m-d H:i',$vo['starttime'])}</td>
- <td>{$liveclass[$vo['liveclassid']]}</td>
- <td>{$type[$vo['type']]}</td>
- <td>{$vo['type_val']}</td>
- <td><if condition="$vo['anyway'] eq 0">竖屏<else/>横屏</if></td>
- <td>{$vo['nums']}</td>
- <td>{$vo['totalcoin']}</td>
- <td>{$vo['total_nums']}</td>
- <td>{$vo['total_average']}</td>
- <td class="taskid-display-{$vo['TaskId']}">{$vo['TaskId']}</td>
- <td>{$vo['pull']}</td>
- <td>{$vo['push']}</td>
- <td>{$vo['deviceinfo']}</td>
- <td>
- <if condition="$vo['isvideo']==1">
- <a class="btn btn-xs btn-primary" href='{:url("Liveing/edit",array("uid"=>$vo["uid"]))}'>{:lang('EDIT')}</a>
- <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Liveing/del',array('uid'=>$vo['uid']))}">{:lang('DELETE')}</a>
- <a class="btn btn-xs btn-danger xiabo-btn" href="#" data-TaskId="{$vo['TaskId']}" data-uid="{$vo['uid']}" >下播</a>
- </if>
- </td>
-
- </tr>
- </foreach>
- </tbody>
- </table>
- <div class="pagination">{$page}</div>
- </form>
- </div>
- <script src="__STATIC__/js/admin.js"></script>
- <script>
- (function(){
- // 给所有具有 .xiabo-btn 类的 <a> 标签添加点击事件监听器
- $('.xiabo-btn').on('click', function(event) {
- event.preventDefault(); // 阻止默认行为(例如链接跳转)
- // 获取当前点击的 <a> 标签的 data-TaskId 和 data-uid 的值
- var TaskId = $(this).attr('data-TaskId');
- var uid = $(this).attr('data-uid');
- // 检查值是否为空或者非数字
- if (TaskId === '' || isNaN(TaskId)) {
- alert('请输入正确的 TaskId(数字)');
- } else {
- $.ajax({
- url: '/admin/liveing/xiabo.html',
- type: 'POST',
- data: {
- uid: uid,
- TaskId: TaskId,
- },
- dataType: 'json',
- success: function (data) {
- location.reload();
- // $('.taskid-display-'+TaskId).val( '已下播-'+TaskId);
- console.log('请求成功:', data);
- },
- error: function (error) {
- console.error('请求失败:', error);
- }
- });
- }
- });
- // 下播
- /*$("#xiabo").on('click', function () {
- // 获取元素的 data-TaskId 属性的值
- var TaskId = $('#xiabo').attr('data-TaskId');
- var uid = $('#xiabo').attr('data-uid');
- // 检查值是否为空或者非数字
- if (TaskId === '' || isNaN(TaskId)) {
- alert('请输入正确的 TaskId(数字)');
- } else {
- $.ajax({
- url: '/admin/liveing/xiabo.html',
- type: 'POST',
- data: {
- uid: uid,
- TaskId: TaskId,
- },
- dataType: 'json',
- success: function (data) {
- $('#taskid-display-'+TaskId).val( '已下播-'+TaskId);
- console.log('请求成功:', data);
- },
- error: function (error) {
- console.error('请求失败:', error);
- }
- });
- }
- })*/
- })()
- </script>
- </body>
- </html>
|