diff --git a/application/admin/controller/User.php b/application/admin/controller/User.php index c033d8990..0f1f2e9e7 100644 --- a/application/admin/controller/User.php +++ b/application/admin/controller/User.php @@ -39,6 +39,10 @@ class User extends BasicAdmin { public function index() { $this->title = '系统用户管理'; $db = Db::name($this->table)->where('is_deleted', '0'); + + if ($this->request->get('username')) { + $db->where('username', 'like', '%' . $this->request->get('username') . '%'); + } parent::_list($db); } diff --git a/application/admin/view/user.index.html b/application/admin/view/user.index.html index c98ca24d0..8fa243101 100644 --- a/application/admin/view/user.index.html +++ b/application/admin/view/user.index.html @@ -2,74 +2,103 @@ {block name="button"}
- - + +
{/block} {block name="content"} + + + + + +
- - - - - - - - - - + + + + + + + + + + - {foreach $list as $key=>$vo} - - - - - - - - - - - {/foreach} + {foreach $list as $key=>$vo} + + + + + + + + + + + {/foreach}
- - 用户账号手机号电子邮箱登录次数最后登录状态操作
+ + 用户账号手机号电子邮箱登录次数最后登录状态操作
- - {$vo.username}{$vo.phone|default="还没有设置手机号"}{$vo.mail|default="还没有设置邮箱"}{$vo.login_num|default="从未登录"}{$vo.login_at|default="从未登录"} - {if $vo.status eq 0} - 已禁用 - {elseif $vo.status eq 1} - 使用中 - {/if} - - {if auth("$classuri/edit")} - | - 编辑 - {/if} - {if auth("$classuri/auth")} - | - 授权 - {/if} - {if auth("$classuri/pass")} - | - 密码 - {/if} - {if $vo.status eq 1 and auth("$classuri/forbid")} - | - 禁用 - {elseif auth("$classuri/resume")} - | - 启用 - {/if} - {if auth("$classuri/del")} - | - 删除 - {/if} -
+ + {$vo.username}{$vo.phone|default="还没有设置手机号"}{$vo.mail|default="还没有设置邮箱"}{$vo.login_num|default="从未登录"}{$vo.login_at|default="从未登录"} + {if $vo.status eq 0} + 已禁用 + {elseif $vo.status eq 1} + 使用中 + {/if} + + {if auth("$classuri/edit")} + | + 编辑 + {/if} + {if auth("$classuri/auth")} + | + 授权 + {/if} + {if auth("$classuri/pass")} + | + 密码 + {/if} + {if $vo.status eq 1 and auth("$classuri/forbid")} + | + 禁用 + {elseif auth("$classuri/resume")} + | + 启用 + {/if} + {if auth("$classuri/del")} + | + 删除 + {/if} +
{if isset($page)}

{$page}

{/if} diff --git a/public/static/admin/listen.js b/public/static/admin/listen.js index 2e79aef73..7101874e9 100644 --- a/public/static/admin/listen.js +++ b/public/static/admin/listen.js @@ -31,7 +31,7 @@ define(['jquery', 'admin.plugs'], function () { }); /*! 注册 data-serach 表单搜索行为 */ - this.$body.on('submit', 'form[data-serach]', function () { + this.$body.on('submit', 'form[data-search]', function () { var split = this.action.indexOf('?') === -1 ? '?' : '&'; if ((this.method || 'get').toLowerCase() === 'get') { window.location.href = '#' + parseUri(this.action + split + $(this).serialize());