mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
97 lines
4.5 KiB
HTML
97 lines
4.5 KiB
HTML
{extend name='main'}
|
|
|
|
{block name="button"}
|
|
|
|
{if auth("add")}
|
|
<button data-modal='{:url("add")}' data-title="添加用户" class='layui-btn layui-btn-sm layui-btn-primary'>添加用户</button>
|
|
{/if}
|
|
|
|
{if auth("remove")}
|
|
<button data-action='{:url("remove")}' data-rule="id#{key}" data-csrf="{:systoken('remove')}" data-confirm="确定要删除这些用户吗?" class='layui-btn layui-btn-sm layui-btn-primary'>删除用户</button>
|
|
{/if}
|
|
|
|
{/block}
|
|
|
|
{block name="content"}
|
|
<div class="think-box-shadow">
|
|
{include file='user/index_search'}
|
|
<table class="layui-table margin-top-10" lay-skin="line">
|
|
{notempty name='list'}
|
|
<thead>
|
|
<tr>
|
|
<th class='list-table-check-td think-checkbox'>
|
|
<label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
|
|
</th>
|
|
<th class='list-table-sort-td'>
|
|
<button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
|
|
</th>
|
|
<th class='text-left nowrap'>用户信息</th>
|
|
<th class='text-left nowrap layui-hide-xs'>联系方式</th>
|
|
<th class='text-left nowrap layui-hide-xs'>最近登录</th>
|
|
<th class='text-left nowrap'>账号状态</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
{/notempty}
|
|
<tbody>
|
|
{foreach $list as $key=>$vo}
|
|
<tr data-dbclick>
|
|
<td class='list-table-check-td think-checkbox'>
|
|
<label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
|
|
</td>
|
|
<td class='list-table-sort-td'>
|
|
<label><input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input"></label>
|
|
</td>
|
|
<td class='text-left nowrap'>
|
|
<img alt="img" width="40px" height="40px" class="text-top margin-right-10" data-tips-image src="{$vo.headimg|default=''}">
|
|
<div class="inline-block">
|
|
登录账号:{$vo.username|default=''}<br>
|
|
账号昵称:{$vo.nickname|default='<span class="color-desc">未配置账号昵称</span>'|raw}<br>
|
|
</div>
|
|
</td>
|
|
<td class='text-left nowrap layui-hide-xs'>
|
|
联系邮箱:{$vo.contact_mail|default='<span class="color-desc">未配置联系邮箱</span>'|raw}<br>
|
|
联系手机:{$vo.contact_phone|default='<span class="color-desc">未配置联系手机</span>'|raw}<br>
|
|
</td>
|
|
<td class='text-left nowrap layui-hide-xs'>
|
|
登录次数:{$vo.login_num|default=0}<br>
|
|
登录地址:{$vo.login_ip|default='--'}<br>
|
|
</td>
|
|
<td class='text-left nowrap'>
|
|
账号状态:{eq name='vo.status' value='0'}<span class="color-red">已禁用</span>{else}<span class="color-green">使用中</span>{/eq}<br>
|
|
创建时间:{$vo.create_at|format_datetime}
|
|
</td>
|
|
<td class='text-left nowrap'>
|
|
|
|
{if auth("pass")}
|
|
<a class="layui-btn layui-btn-sm layui-btn-normal" data-title="设置密码" data-modal='{:url("pass")}?id={$vo.id}'>密 码</a>
|
|
{/if}
|
|
|
|
{if auth("edit")}
|
|
<a data-dbclick class="layui-btn layui-btn-sm" data-title="编辑用户资料" data-modal='{:url("edit")}?id={$vo.id}'>编 辑</a>
|
|
{/if}
|
|
|
|
{if auth("state") and $vo.status eq 1}
|
|
<a class="layui-btn layui-btn-sm layui-btn-warm" data-confirm="确定要禁用该用户吗?" data-action="{:url('state')}" data-value="id#{$vo.id};status#0" data-csrf="{:systoken('state')}">禁 用</a>
|
|
{/if}
|
|
|
|
{if auth("state") and $vo.status eq 0}
|
|
<a class="layui-btn layui-btn-sm layui-btn-warm" data-confirm="确定要启用该用户吗?" data-action="{:url('state')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('state')}">启 用</a>
|
|
{/if}
|
|
|
|
{if auth("remove")}
|
|
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除该用户吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
|
|
{/if}
|
|
|
|
</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
|
|
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
|
|
|
</div>
|
|
|
|
{/block}
|