cxhxy/app/admin/view/user/index.html
test_service d3170b4d1c 1
2023-12-01 15:43:29 +08:00

94 lines
5.0 KiB
HTML
Executable File

<div class="row-content am-cf">
<div class="row layui-form layui-form-pane">
<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
<div class="widget am-cf">
<div class="widget-head am-cf">
<div class="widget-title am-cf">{$title}列表</div>
</div>
<div class="widget-body am-fr">
<div class="am-scrollable-horizontal am-u-sm-12">
<table width="100%" class="am-table am-table-hover tpl-table-black">
<thead>
<tr>
<th>编号</th>
<th>头像</th>
<th>昵称</th>
<th>性别</th>
<th>钱包</th>
<th>积分</th>
<th>电话</th>
<th>省份</th>
<th>城市</th>
<th>代理</th>
<th>注册</th>
<th>管理</th>
</tr>
</thead>
<tbody>
{if !$list->isEmpty()}
{foreach $list as $item}
<tr>
<td class="am-text-middle">{$item['user_id']}</td>
<td class="am-text-middle">
<img src="{$item['avatar']}" width="72" height="72" alt="">
</td>
<td class="am-text-middle">{$item['nickname']}</td>
<td class="am-text-middle">{$item['gender']}</td>
<td class="am-text-middle">{$item['money']}</td>
<td class="am-text-middle">{$item['score']}</td>
<td class="am-text-middle">{$item['phone']}</td>
<td class="am-text-middle">{$item['province'] ?: '--'}</td>
<td class="am-text-middle">{$item['city'] ?: '--'}</td>
<td class="am-text-middle">
{if $status != 10}
<span class="j-state am-badge x-cur-p <?= $item['status']['value'] == 30 ? ' am-badge-success'
: ' am-badge-warning' ?>"
data-id="<?= $item['user_id'] ?>"
data-status="<?= $item['status']['value'] ?>">
{$item['status']['value']==30?'是':'否'}
</span>
{/if}
</td>
<td class="am-text-middle">{$item['create_time']}</td>
<td class="am-text-middle">
<div class="tpl-table-black-operation">
{if $item['status']['value'] > 10}
<a href="{:url('user/oneKey',['id' => $item['user_id'],'status' => $status])}" target="_blank">
<i class="am-icon-user"></i> 登录
</a>
{/if}
</div>
</td>
</tr>
{/foreach}
{else /}
<tr>
<td colspan="12" class="am-text-center">暂无记录</td>
</tr>
{/if}
</tbody>
</table>
</div>
<div class="am-u-lg-12 am-cf">
<div class="am-fr">{:$list->render()} </div>
<div class="am-fr pagination-total am-margin-right">
<div class="am-vertical-align-middle">总记录:{:$list->total()}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(function () {
// 切换状态
$('.j-state').click(function () {
var data = $(this).data();
var msg = '确定要'+(parseInt(data.status) === 30 ? '取消' : '设置为')+'代理?';
$('.j-state').del('id', "{:url('user/status')}",msg);
});
});
</script>