Commit 42c95d9c authored by clone's avatar clone

bug 分页

parent 7f8dd008
......@@ -192,6 +192,10 @@ a:hover{
margin-top: 7px;
margin-left: 7px;
}
#pagediv{
width: 100%;
text-align: right;
}
#pagediv a,#pagediv span{
display: inline-block;
......
......@@ -4,7 +4,7 @@
define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart', 'css!style/home.css', 'blow-up'], function (doT, template) {
var banner = {
pageNo: 1, /*第几页*/
pageSize: 15, /*每页显示多少条*/
pageSize: 5, /*每页显示多少条*/
datas: "",
init: function () {
//初始化dot
......@@ -137,7 +137,7 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
var doTtmpl = doT.template (temp);
$ ("#banner_list").html (doTtmpl (data.data.list));
/*分页代码*/
add_page(data.data.total,pageNo,banner.pageSize,banner.getList);
add_page(data.data.total,pageNo,banner.pageSize,banner.getBannerList);
/*$ ("#pagediv").pagination ({
length: data.data.total,
current: pageNo,
......
......@@ -3,7 +3,7 @@
*/
function add_page (total_list, page_no, page_size, methodName) {
console.log (total_list - page_size);
if (total_list - page_size < 0) {
$ ('#pagediv').html ('');
return;
......
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