编写用户列表
This commit is contained in:
1 parent
0cb0ee8a2e
commit
296c5d2965
6 files changed
+32
-42
No files matched your search
@@ -16,9 +16,7 @@ class Index extends Base
|
||||
$admin = new Admin();
|
||||
|
||||
// 获取管理员信息
|
||||
$list = $admin
|
||||
->where('id','>',1)
|
||||
->all();
|
||||
$list['title'] = '管理员列表';
|
||||
|
||||
// 模板赋值
|
||||
$this->assign('list',$list);
|
||||
@@ -28,6 +26,28 @@ class Index extends Base
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 获取数据管理员数据
|
||||
public function ajaxData()
|
||||
{
|
||||
//实例化管理员数据模型类
|
||||
$admin = new Admin();
|
||||
|
||||
$data = $admin
|
||||
->field('id,username')
|
||||
->all();
|
||||
// $data =[
|
||||
// "data"=> [
|
||||
// [
|
||||
// "Tiger Nixon",
|
||||
// "System Architect",
|
||||
// ],]];
|
||||
// $data = $data->toArray();
|
||||
$data = ['data'=>$data];
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示创建资源表单页.
|
||||
*
|
||||
|
||||
@@ -10,29 +10,13 @@
|
||||
<thead>
|
||||
<tr class="text-c">
|
||||
<th width="25"><input type="checkbox" name="" value=""></th>
|
||||
<th width="25">ID</th>
|
||||
<th width="100">用户名</th>
|
||||
<th width="40">性别</th>
|
||||
<th width="90">手机</th>
|
||||
<th width="50">邮箱</th>
|
||||
<th width="">地址</th>
|
||||
<th width="130">加入时间</th>
|
||||
<th width="70">状态</th>
|
||||
<th width="100">操作</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="text-c">
|
||||
<td><input type="checkbox" value="1" name=""></td>
|
||||
<td>1</td>
|
||||
<td><u style="cursor:pointer" class="text-primary" onclick="member_show('张三','member-show.html','10001','360','400')">张三</u></td>
|
||||
<td>男</td>
|
||||
<td>13000000000</td>
|
||||
<td>admin@mail.com</td>
|
||||
<td class="text-l">北京市 海淀区</td>
|
||||
<td>2014-6-11 11:11:42</td>
|
||||
<td class="td-status"><span class="label label-success radius">已启用</span></td>
|
||||
<td class="td-manage"><a style="text-decoration:none" onClick="member_stop(this,'10001')" href="javascript:;" title="停用"><i class="Hui-iconfont"></i></a> <a title="编辑" href="javascript:;" onclick="member_edit('编辑','member-add.html','4','','510')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont"></i></a> <a style="text-decoration:none" class="ml-5" onClick="change_password('修改密码','change-password.html','10001','600','270')" href="javascript:;" title="修改密码"><i class="Hui-iconfont"></i></a> <a title="删除" href="javascript:;" onclick="member_del(this,'1')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont"></i></a></td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
|
||||
<script>DD_belatedPNG.fix('*');</script>
|
||||
<![endif]-->
|
||||
<title>{$list}</title>
|
||||
<title>{$list.title}</title>
|
||||
</head>
|
||||
<body>
|
||||
{block name="topnav"}{/block}
|
||||
@@ -31,16 +31,7 @@
|
||||
{block name="bouttons"}{/block}
|
||||
{block name="tables"}{/block}
|
||||
</div>
|
||||
<!--_footer 作为公共模版分离出去-->
|
||||
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
|
||||
<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script>
|
||||
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
|
||||
|
||||
<!--请在下方写此页面业务相关的脚本-->
|
||||
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
|
||||
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
|
||||
<!--_footer 作为公共模版分离出去-->
|
||||
{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/jquery/1.9.1/jquery.min.js"}
|
||||
{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/layer/2.4/layer.js"}
|
||||
@@ -74,6 +65,11 @@ $(function(){
|
||||
"sLast": " 最后一页 "
|
||||
},
|
||||
},
|
||||
// 使用ajax到后台服务获取数据
|
||||
"ajax": {
|
||||
"url": "{:url('ajaxdata')}", //请求数据的后台地址
|
||||
"type": "POST", // ajax的请求方法
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Loaded 3 of 6 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user