🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## 代码 ``` <!doctype html> <html> <head> <meta charset="utf-8"> <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> </head> <body> <form class="well form-inline margin-top-20" method="post" action="{:url('User/index')}"> 用户名: <input type="text" class="form-control" name="user_login" style="width: 120px;" value="{:input('request.user_login/s','')}" placeholder="请输入用户名"> 邮箱: <input type="text" class="form-control" name="user_email" style="width: 120px;" value="{:input('request.user_email/s','')}" placeholder="请输入邮箱"> <input type="submit" class="btn btn-primary" value="搜索" /> <a class="btn btn-danger" href="{:url('User/index')}">清空</a> </form> <table class="table table-hover table-bordered"> <thead> <tr> <th width="50">ID</th> <th>用户名</th> <th>最后登录IP</th> <th>最后登录时间</th> <th>邮箱</th> <th>状态</th> <th width="130">操作</th> </tr> </thead> <tbody> <foreach name="users" item="vo"> <tr> <td>{$vo.id}</td> <td><if condition="$vo['user_url']"><a href="{$vo.user_url}" target="_blank" title="{$vo.signature}">{$vo.user_login}</a><else />{$vo.user_login}</if></td> <td>{$vo.last_login_ip}</td> <td> <if condition="$vo['last_login_time'] eq 0"> 该用户还没登陆过 <else /> {$vo.last_login_time} </if> </td> <td>{$vo.user_email}</td> <td>{$vo.user_status}</td> <td> <if condition="$vo['id'] eq 1 || $vo['id'] eq cmf_get_current_admin_id()"> <font color="#cccccc">编辑</font> <font color="#cccccc">删除</font> <if condition="$vo['user_status'] eq 1"> <font color="#cccccc">已拉黑</font> <else /> <font color="#cccccc">正常</font> </if> <else /> <a href='{:url("user/edit",array("id"=>$vo["id"]))}'>编辑</a> <a class="js-ajax-delete" href="{:url('user/delete',array('id'=>$vo['id']))}">删除</a> <if condition="$vo['user_status'] eq 1"> <a href="{:url('user/ban',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="您确定要拉黑此用户吗?">拉黑</a> <else /> <a href="{:url('user/cancelban',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="您确定要启用此用户吗?">启用</a> </if> </if> </td> </tr> </foreach> </tbody> </table> <div class="pagination">{$page}</div> </body> </html> ```