Commit d523054f authored by hujun's avatar hujun

部门列表分页

parent e81e0215
define (['doT', 'text!temp/district_template_tpl.html', 'css!style/home.css','pagination','bootstrapJs'], function (doT, template) { define (['doT', 'text!temp/district_template_tpl.html', 'css!style/home.css','pagination','bootstrapJs'], function (doT, template) {
district = { district = {
pageNo: 1, /*第几页*/ pageNo: 1, /*第几页*/
pageSize: 10, /*每页显示多少条*/ pageSize: 15, /*每页显示多少条*/
pageNum:10, pageNum:10,
district : 0, district : 0,
agent_id : 0, agent_id : 0,
...@@ -161,15 +161,9 @@ define (['doT', 'text!temp/district_template_tpl.html', 'css!style/home.css','pa ...@@ -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 temp = document.getElementById ('district_list_tpl').innerHTML;
var doTtmpl = doT.template (temp); var doTtmpl = doT.template (temp);
$ ("#district_list").html (doTtmpl (data.data.list)); $ ("#district_list").html (doTtmpl (data.data.list));
/*分页代码*/ /*分页代码*/
$ ("#pagediv").pagination ({ add_page(data.data.total, pageNo, district.pageSize, district.getList);
length: data.data.total,
current: pageNo,
every: district.pageSize,
onClick: function (el) {
district.getList (el.num.current);
}
});
} }
}); });
} }
......
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