222 lines
6.5 KiB
HTML
222 lines
6.5 KiB
HTML
{extend name="public/base"/}
|
|
{block name="body"}
|
|
<style>
|
|
.table-responsive{min-height:600px;}
|
|
</style>
|
|
|
|
<div class="main-box no-header clearfix">
|
|
<header class="main-box-header clearfix">
|
|
<div class="pull-left">
|
|
<h2>{$meta_title}</h2>
|
|
<h2>当前在线人数:<font style="font-weight:600;color:red;">{$user_count}</font></h2>
|
|
</div>
|
|
<div class="pull-right">
|
|
<a href="{:url('add')}" class="btn btn-primary pull-right"> <i class="fa fa-plus-circle fa-lg"></i> 新增用户</a>
|
|
</div>
|
|
</header>
|
|
<div class="main-box-body clearfix">
|
|
<div class="row">
|
|
<form method="get">
|
|
<div class="col-sm-12 col-md-3">
|
|
<input type="text" class="form-control" name="keyword" value="{$keyword|default=''}" placeholder="请输入用户名">
|
|
</div>
|
|
<div class="col-sm-12 col-md-3">
|
|
<input type="text" class="form-control" name="uid" placeholder="用户ID">
|
|
</div>
|
|
<div class="col-sm-12 col-md-3">
|
|
<select name="group" id="group" class="form-control">
|
|
<option value="">请选择类别</option>
|
|
{volist name="group_list" id="v"}
|
|
<option value="{$v.id}" {if $group==$v.id}selected {/if}>{$v.title}</option>
|
|
{/volist}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="col-sm-12 col-md-3">
|
|
<button class="btn btn-primary" type="submit">搜索</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="table-responsive">
|
|
<table class="table user-list table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<span>ID</span>
|
|
</th>
|
|
<th>头像</th>
|
|
|
|
<th>
|
|
<span>用户昵称</span>
|
|
</th>
|
|
<!-- <th>
|
|
<span>手机号码</span>
|
|
</th> -->
|
|
<th>
|
|
<span>授权分组</span>
|
|
</th>
|
|
<th>
|
|
<span>阅读币</span>
|
|
</th>
|
|
<th>
|
|
<span>赠币</span>
|
|
</th>
|
|
<th>
|
|
<span>包月/包季/包年</span>
|
|
</th>
|
|
<th>
|
|
<span>注册时间</span>
|
|
</th>
|
|
<th class="text-center">
|
|
<span>状态</span>
|
|
</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{volist name="list" id="item"}
|
|
<tr>
|
|
<td>{$item['uid']}</td>
|
|
<td><img src="{$item['avatar']}" style="widow:50px;height:50px;"></td>
|
|
<td>
|
|
<!----
|
|
<img src="{:avatar($item['uid'])}" alt=""/>
|
|
<a href="#" class="user-link">{$item['nickname']}</a>
|
|
<span class="user-subhead"></span>
|
|
----->
|
|
<a href="#" target="_blank">{$item['uid']|get_nickname}</a>
|
|
</td>
|
|
|
|
<!-- <td>
|
|
<span >{$item['mobile']}</span>
|
|
</td> -->
|
|
<td>
|
|
{volist name="group_list" id="v"}
|
|
{if $item['group']==$v['id']}{$v.title}{/if}
|
|
{/volist}
|
|
</td>
|
|
<td>
|
|
<span >{$item['egold']}</span>
|
|
</td>
|
|
<td>
|
|
<span >{$item['zb']}</span>
|
|
</td>
|
|
<td>
|
|
|
|
{if condition="($item['is_vip'] == 1) and ($item['vip_enddate'] >= time()) "}
|
|
<span >包月<br>{$item['vip_enddate']|date='Y-m-d',###}到期</span>
|
|
{elseif condition="($item['is_vip'] == 2) and ($item['vip_enddate'] >= time()) "/}
|
|
<span >包季<br>{$item['vip_enddate']|date='Y-m-d',###}到期</span>
|
|
{elseif condition="($item['is_vip'] == 3) and ($item['vip_enddate'] >= time()) "/}
|
|
<span >包年<br>{$item['vip_enddate']|date='Y-m-d',###}到期</span>
|
|
{else}
|
|
未开通
|
|
{/if}
|
|
|
|
</td>
|
|
<td>{$item['reg_time']|date='Y-m-d H:i:s',###}</td>
|
|
<td class="text-center">
|
|
{if condition="$item['status']==1"}
|
|
<span class="btn btn-primary" onclick="setstatus('{$item['uid']}',0)">禁用</span>
|
|
{else/}
|
|
<span class="btn btn-primary" onclick="setstatus('{$item['uid']}',1)">启用</span>
|
|
{/if}
|
|
</td>
|
|
<td>
|
|
|
|
<a href="{:url('User/edit',array('id'=>$item['uid']))}" class="table-link" title="">
|
|
编辑
|
|
</a>
|
|
|
|
<a href="{:url('User/del',array('id'=>$item['uid']))}" class="table-link confirm ajax-get">
|
|
删除
|
|
</a>
|
|
|
|
<div class="btn-group">
|
|
<button type="button" class="btn btn-xs btn-info dropdown-toggle" data-toggle="dropdown">
|
|
更多 <span class="caret"></span>
|
|
</button>
|
|
<ul class="dropdown-menu dropdown-menu-right">
|
|
{if $item['group'] !=99&&$item['group']!=3 && $item['group']!=4}
|
|
<!-- <li><a href="{:url('User/auth',array('id'=>$item['uid']))}"><i class="fa fa-male"></i>授权
|
|
</a></li> -->
|
|
{/if}
|
|
{if $item['group']!=3 && $item['group']!=4}
|
|
<li>
|
|
<a href="{:url('User/setegold',array('id'=>$item['uid']))}" ><i class="fa fa-paypal"></i>手工充值</a></li>
|
|
<li><a href="{:url('User/setvip',array('id'=>$item['uid']))}" target="_blank"><i class="fa fa-gratipay"></i>开通包月/包季/包年</a>
|
|
</li>
|
|
{/if}
|
|
{if $item['group']==4 || $item['group']==3}
|
|
<li><a href="{:url('User/percentage',array('id'=>$item['uid']))}" class="table-link" title="">
|
|
抽成设置
|
|
</a></li>
|
|
<li><a href="{:url('User/gathering',array('id'=>$item['uid']))}" class="table-link" title="">
|
|
收款信息
|
|
</a></li>
|
|
<li><a href="{:url('User/level',array('id'=>$item['uid']))}" class="table-link" title="">
|
|
等级划分
|
|
</a></li>
|
|
{/if}
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
{/volist}
|
|
</tbody>
|
|
</table>
|
|
{$page}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{/block}
|
|
{block name="script"}
|
|
<script>
|
|
//黑白名单设置
|
|
function setstatus(id,t){
|
|
swal({
|
|
title: '确定加入黑名单/白名单?',
|
|
text: "",
|
|
type: 'warning',
|
|
buttons:{
|
|
confirm: {
|
|
text : '确认',
|
|
className : 'btn btn-success'
|
|
},
|
|
cancel: {
|
|
text : '关闭',
|
|
visible: true,
|
|
className: 'btn btn-danger'
|
|
}
|
|
}
|
|
}).then((Delete) => {
|
|
if (Delete) {
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "{:url('user/setUserStatus')}",
|
|
data: {id:id,t,t},
|
|
dataType: "json",
|
|
success: function(data) {
|
|
if(data.status==1){
|
|
swal('成功',"", {icon : "success",buttons:{confirm:{className : 'btn btn-success'}},});
|
|
window.location = '';
|
|
}else{
|
|
swal('错误','', {icon : "error",buttons:{confirm:{className : 'btn btn-danger'}},});
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
} else {
|
|
//关闭执行
|
|
swal.close();
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
|
|
{/block} |