Commit a88780ad authored by 刘丹's avatar 刘丹

总监列表

parent cf4e9413
<!DOCTYPE html> {layout name="global/frame_tpl" /}
<html lang="en"> <!--角色管理页面-->
<head> <input type="hidden" class="page-load" id="district" />
<meta charset="UTF-8"> <div id="page-content-wrapper">
<title>Title</title> <div class="container">
</head> <div class="row">
<body> <div class="col-lg-10 col-lg-offset-0">
<div class="panel panel-default">
</body> <div class="panel-heading breadcrumb">
</html> <li><a href="#">总监列表</a></li>
\ No newline at end of file </div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<td colspan="11">
<form id="form_search">
<!-- 搜索框 -->
<div class="col-xs-12 col-sm-3 clearfix fl margin-top-ld">
<form class="form form-inline" method="get" action="/admin.php/admin/user/index.html">
<div class="form-group">
<div class="input-group search-form">
<input type="text" name="search" class="form-control search-input pull-right" value="" placeholder="请输入ID/用户名/昵称">
<span class="input-group-btn">
<button id="search" type="button" class="btn btn-success search-btn"><i class="glyphicon glyphicon-search"></i></button>
</span>
</div>
</div>
</form>
</div>
</form>
</td>
</tr>
<tr>
<th class="text-center">注册时间</th>
<th class="text-center">用户ID</th>
<th class="text-center">姓名<th>
<th class="text-center">手机号</th>
<th class="text-center">绑定小组/门店</th>
</tr>
</thead>
<tbody id="district_list">
</tbody>
</table>
</div>
<!-- /#page-content-wrapper//分页 -->
<div class="text-right pageinfo" id="pagediv">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...@@ -40,6 +40,9 @@ ...@@ -40,6 +40,9 @@
<li role="presentation"> <li role="presentation">
<a href="/admin.php/index/agent.html">经纪人列表</a> <a href="/admin.php/index/agent.html">经纪人列表</a>
</li> </li>
<li role="presentation">
<a href="/admin.php/index/districtList.html">总监列表</a>
</li>
<li role="presentation"> <li role="presentation">
<a href="/admin.php/index/authRuleIndex.html">权限管理</a> <a href="/admin.php/index/authRuleIndex.html">权限管理</a>
</li> </li>
......
define (['doT', 'text!temp/district_template_tpl.html', 'css!style/home.css','pagination','bootstrapJs'], function (doT, template) {
district = {
pageNo: 1, /*第几页*/
pageSize: 10, /*每页显示多少条*/
init: function () {
//初始化dot
$ ("body").append (template);
district.getList ();
district.event ();
},
event: function () {
$ (document).delegate ("#search", "click", function () {//点击搜索
district.getList(1);
});
},
getList: function (pageNo) {
district.pageNo = pageNo;
var params = {};
params.pageNo = district.pageNo;
params.pageSize = district.pageSize;
params.search = $("input[name='search']").val();
$.ajax ({
url: '/index/getDistrictList',//列表数据
type: 'GET',
async: true,
data: params,
dataType: 'json',
success: function (data) {
var temp = document.getElementById ('district_list_tpl').innerHTML;
var doTtmpl = doT.template (temp);
$ ("#district_list").html (doTtmpl (data.data.list));
/*分页代码*/
$ ("#pagediv").pagination ({
length: data.data.total,
current: pageNo,
every: district.pageSize,
onClick: function (el) {
district.getList (el.num.current);
}
});
}
});
}
};
return district;
});
\ No newline at end of file
<script id="district_list_tpl" type="text/template">
[% if(it) { %]
[% for(var item in it){ %]
<tr>
<td>[%= it[item]["create_time"] %]</td>
<td>[%= it[item]["id"] %]</td>
<td>[%= it[item]["name"] %]</td>
<td>[%= it[item]["phone"] %]</td>
<td>[%= it[item]["store_name"] %]</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="8" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment