Commit 69c80882 authored by hujun's avatar hujun

部门列表分页

parent 1191f1f6
define (['doT', 'text!temp/district_template_tpl.html', 'css!style/home.css','pagination','bootstrapJs'], function (doT, template) {
district = {
pageNo: 1, /*第几页*/
pageSize: 10, /*每页显示多少条*/
pageSize: 15, /*每页显示多少条*/
pageNum:10,
district : 0,
agent_id : 0,
......@@ -161,15 +161,9 @@ define (['doT', 'text!temp/district_template_tpl.html', 'css!style/home.css','pa
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);
}
});
add_page(data.data.total, pageNo, district.pageSize, district.getList);
}
});
}
......
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